Use _DIR instead of pwd
This commit is contained in:
@@ -24,8 +24,11 @@ function main() {
|
|||||||
pushd -q "${tmpdir}"
|
pushd -q "${tmpdir}"
|
||||||
cloneMacOSSystemRepo
|
cloneMacOSSystemRepo
|
||||||
cloneZSHLibRepo
|
cloneZSHLibRepo
|
||||||
sudo ./install.sh
|
sudo "${tmpdir}/install.sh"
|
||||||
popd -q
|
popd -q
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if [[ "${ZSH_EVAL_CONTEXT}" == toplevel ]]; then
|
||||||
|
_DIR="${0:A:h}"
|
||||||
main
|
main
|
||||||
|
fi
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ function ensureDocopts() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function autoloadZShLib() {
|
function autoloadZShLib() {
|
||||||
export ASTZWEIG_ZSHLIB="`pwd`/zshlib"
|
export ASTZWEIG_ZSHLIB="${_DIR}/zshlib"
|
||||||
FPATH="${ASTZWEIG_ZSHLIB}:${FPATH}"
|
FPATH="${ASTZWEIG_ZSHLIB}:${FPATH}"
|
||||||
local funcNames=("${(@f)$(find "${ASTZWEIG_ZSHLIB}" -type f -perm +u=x -maxdepth 1 | awk -F/ '{ print $NF }')}")
|
local funcNames=("${(@f)$(find "${ASTZWEIG_ZSHLIB}" -type f -perm +u=x -maxdepth 1 | awk -F/ '{ print $NF }')}")
|
||||||
autoload -Uz "${funcNames[@]}"
|
autoload -Uz "${funcNames[@]}"
|
||||||
@@ -290,12 +290,12 @@ function main() {
|
|||||||
local allModules=() modulesToInstall=()
|
local allModules=() modulesToInstall=()
|
||||||
local -A answers
|
local -A answers
|
||||||
configureLogging
|
configureLogging
|
||||||
|
lop debug "Current working dir is: `pwd`"
|
||||||
lop debug "Called main with $# args: $@"
|
lop debug "Called main with $# args: $@"
|
||||||
loadModules
|
loadModules
|
||||||
askNecessaryQuestions
|
askNecessaryQuestions
|
||||||
[ -z "${config_only}" ] || return 0
|
[ -z "${config_only}" ] || return 0
|
||||||
installModules
|
installModules
|
||||||
lop debug "Current working dir is: `pwd`"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if [[ "${ZSH_EVAL_CONTEXT}" == toplevel ]]; then
|
if [[ "${ZSH_EVAL_CONTEXT}" == toplevel ]]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user