From 37db5ac3c6caf124efef6f8efe3683803a94c7e6 Mon Sep 17 00:00:00 2001 From: CryptoManiac Date: Thu, 30 Dec 2021 08:37:50 +0300 Subject: [PATCH] Fix script path detection on macOS --- share/genbuild.sh | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/share/genbuild.sh b/share/genbuild.sh index 0dff4ba..7eee927 100755 --- a/share/genbuild.sh +++ b/share/genbuild.sh @@ -1,7 +1,11 @@ #!/bin/sh +realpath() { + [[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}" +} + PREVDIR=$(pwd) -SCRIPT=$(readlink -f $0) +SCRIPT=$(realpath $0) SCRIPTPATH=`dirname $SCRIPT` if [ $# -gt 0 ]; then -- 1.7.1