From 85d4f888eaa9ecba5f58c9cf263879343ad2f330 Mon Sep 17 00:00:00 2001 From: Bryan Thornbury Date: Thu, 22 Oct 2015 15:56:12 -0700 Subject: [PATCH] fix relative paths in build --- build.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/build.sh b/build.sh index f5cd82529..fae8425d6 100755 --- a/build.sh +++ b/build.sh @@ -2,6 +2,14 @@ # # $1 is passed to package to enable deb or pkg packaging -./scripts/bootstrap.sh +SOURCE="${BASH_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")" + [[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located +done +DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" -./scripts/package.sh $1 +$DIR/scripts/bootstrap.sh + +$DIR/scripts/package.sh $1