build: Fixed issue in sourcetrail.sh Linux script (issue #638)
This commit is contained in:
Regular → Executable
+4
-3
@@ -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 )"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user