From 7ab13b3e37101dacd56eea92161810a5a757e2d6 Mon Sep 17 00:00:00 2001 From: Francois B Date: Thu, 22 Mar 2018 11:52:09 +0100 Subject: [PATCH] fix path problem about sourced scripts --- vars.sh | 2 +- yggdrasil.sh | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) 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