improved script path detection for future improvement
This commit is contained in:
4
init.sh
4
init.sh
@@ -38,8 +38,8 @@ export LANG=C
|
||||
# Version of init
|
||||
export VERSION="0.99.8"
|
||||
|
||||
# Store script's path
|
||||
export MYPATH=$(dirname $0)
|
||||
# Store script's path (realpath -s resolve symlinks if init.sh is a symlink)
|
||||
export MYPATH=$(dirname $(realpath -s $0))
|
||||
|
||||
# Get hostname
|
||||
export HOSTNAME=$(hostname)
|
||||
|
||||
Reference in New Issue
Block a user