diff --git a/vars.sh b/vars.sh index cbad0cb..aeb51b8 100644 --- a/vars.sh +++ b/vars.sh @@ -23,7 +23,7 @@ myHomedir=$(whoami) # # script base dir # -scriptDir=$(pwd) +scriptDir=$(dirname $0) # # logfile diff --git a/yggdrasil.sh b/yggdrasil.sh index 915c838..989d7aa 100755 --- a/yggdrasil.sh +++ b/yggdrasil.sh @@ -10,12 +10,12 @@ # # include functions and vars from external files # -source ./vars.sh -source ./core_functions.sh -source ./repo_functions.sh -source ./install_functions.sh -source ./menus_functions.sh -source ./tools_functions.sh +source $(dirname $0)/vars.sh +source $(dirname $0)/core_functions.sh +source $(dirname $0)/repo_functions.sh +source $(dirname $0)/install_functions.sh +source $(dirname $0)/menus_functions.sh +source $(dirname $0)/tools_functions.sh # # check if the script is running in root/sudo