From c7cc70c22ee1edc9ce999283aa32ec82870f0d32 Mon Sep 17 00:00:00 2001 From: Eberhard Graether Date: Thu, 6 Dec 2018 18:08:40 +0100 Subject: [PATCH] build: Fixed issue in sourcetrail.sh Linux script (issue #638) --- setup/Linux/Sourcetrail.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) mode change 100644 => 100755 setup/Linux/Sourcetrail.sh diff --git a/setup/Linux/Sourcetrail.sh b/setup/Linux/Sourcetrail.sh old mode 100644 new mode 100755 index ce5f1b8e..0365d01a --- a/setup/Linux/Sourcetrail.sh +++ b/setup/Linux/Sourcetrail.sh @@ -5,9 +5,10 @@ SOURCE="${0}" while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" SOURCE="$(readlink "$SOURCE")" - if [ "$SOURCE" != /* ]; then - SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located - fi + case $SOURCE in # if $SOURCE is a relative symlink, we need to resolve it relative to the path where the symlink file was located + /*) ;; + *) SOURCE="$DIR/$SOURCE" ;; + esac done SOURCETRAIL_PATH="$( cd -P "$( dirname "$SOURCE" )" && pwd )"