diff --git a/core_functions.sh b/core_functions.sh index 76ff7e1..ebf8357 100644 --- a/core_functions.sh +++ b/core_functions.sh @@ -71,7 +71,7 @@ function runCmd () { function pressKey () { printf "$*\n" if which mpg123 >/dev/null; then - mpg123 -q $scriptDir/notify.mp3 & + mpg123 -q /opt/yggdrasil/notify.mp3 & fi printf $INV read -p "Press key to continue ..." diff --git a/vars.sh b/vars.sh index aeb51b8..1ff9b08 100644 --- a/vars.sh +++ b/vars.sh @@ -13,18 +13,13 @@ # # app version number # -version="0.3.0" +version="0.4.0" # # myHomedir is used in full paths to the homedir # myHomedir=$(whoami) -# -# script base dir -# -scriptDir=$(dirname $0) - # # logfile # diff --git a/yggdrasil.sh b/yggdrasil.sh index 989d7aa..b7703e5 100755 --- a/yggdrasil.sh +++ b/yggdrasil.sh @@ -10,12 +10,22 @@ # # include functions and vars from external files # -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 +dir=$(dirname $0) +if [ ! $dir == "/opt/yggdrasil" ]; then + source /opt/yggdrasil/vars.sh + source /opt/yggdrasil/core_functions.sh + source /opt/yggdrasil/repo_functions.sh + source /opt/yggdrasil/install_functions.sh + source /opt/yggdrasil/menus_functions.sh + source /opt/yggdrasil/tools_functions.sh +else + 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 +fi # # check if the script is running in root/sudo @@ -113,8 +123,6 @@ done # Menu Mode # #-----------------------------------------------------------------------------# -clear - # show Yggdrasil logo dispLogo