From 7294d4678a51b9827b82b91d2b1997a6ae244b89 Mon Sep 17 00:00:00 2001 From: "Bradan J. Wolbeck (CompaqDisc)" Date: Wed, 29 Apr 2020 21:38:57 -0600 Subject: [PATCH] Fix build script Use absolute path rather than erroneously using relative path. --- bin/build.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/bin/build.sh b/bin/build.sh index db83618c..801d66b9 100755 --- a/bin/build.sh +++ b/bin/build.sh @@ -2,7 +2,9 @@ echo Starting build.sh PATH=/usr/local/bin:$PATH:$HOME/bin -cd "$(dirname "$0")" +SCRIPT="$(realpath "$0")" +SCRIPTPATH="$(dirname "$SCRIPT")" +cd $SCRIPTPATH # exit when any command fails set -e @@ -14,14 +16,14 @@ if [ ! -f ../BeefySysLib/third_party/libffi/Makefile ]; then cd ../BeefySysLib/third_party/libffi ./configure make - cd "$(dirname "$0")" + cd $SCRIPTPATH fi if [ ! -d ../extern/llvm_linux_8_0_0 ]; then echo Building LLVM... cd ../extern ./llvm_build.sh - cd "$(dirname "$0")" + cd $SCRIPTPATH fi ### LIBS ###