From 0ed780d80de8e1be1d0d99d045c8d4b4d27d52ac Mon Sep 17 00:00:00 2001 From: fatalerrors Date: Tue, 5 Oct 2021 12:00:21 +0200 Subject: [PATCH] improved script path detection for future improvement --- init.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/init.sh b/init.sh index c7f3d55..b0c8df6 100755 --- a/init.sh +++ b/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)