fix source dir problem for future deb packaging

This commit is contained in:
Francois B 2018-03-22 13:53:16 +01:00
parent 12c9864754
commit 2fc30c7f7a
3 changed files with 18 additions and 15 deletions

View file

@ -71,7 +71,7 @@ function runCmd () {
function pressKey () { function pressKey () {
printf "$*\n" printf "$*\n"
if which mpg123 >/dev/null; then if which mpg123 >/dev/null; then
mpg123 -q $scriptDir/notify.mp3 & mpg123 -q /opt/yggdrasil/notify.mp3 &
fi fi
printf $INV printf $INV
read -p "Press <Enter> key to continue ..." read -p "Press <Enter> key to continue ..."

View file

@ -13,18 +13,13 @@
# #
# app version number # app version number
# #
version="0.3.0" version="0.4.0"
# #
# myHomedir is used in full paths to the homedir # myHomedir is used in full paths to the homedir
# #
myHomedir=$(whoami) myHomedir=$(whoami)
#
# script base dir
#
scriptDir=$(dirname $0)
# #
# logfile # logfile
# #

View file

@ -10,12 +10,22 @@
# #
# include functions and vars from external files # include functions and vars from external files
# #
source $(dirname $0)/vars.sh dir=$(dirname $0)
source $(dirname $0)/core_functions.sh if [ ! $dir == "/opt/yggdrasil" ]; then
source $(dirname $0)/repo_functions.sh source /opt/yggdrasil/vars.sh
source $(dirname $0)/install_functions.sh source /opt/yggdrasil/core_functions.sh
source $(dirname $0)/menus_functions.sh source /opt/yggdrasil/repo_functions.sh
source $(dirname $0)/tools_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 # check if the script is running in root/sudo
@ -113,8 +123,6 @@ done
# Menu Mode # # Menu Mode #
#-----------------------------------------------------------------------------# #-----------------------------------------------------------------------------#
clear
# show Yggdrasil logo # show Yggdrasil logo
dispLogo dispLogo