aboutsummaryrefslogtreecommitdiff
path: root/scripts/build.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/build.sh')
-rwxr-xr-xscripts/build.sh7
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/build.sh b/scripts/build.sh
index b2df5b9..a08b9b7 100755
--- a/scripts/build.sh
+++ b/scripts/build.sh
@@ -1,6 +1,6 @@
#!/bin/bash -e
-prefix="${1:-$(pwd)}/build"
+PREFIX="${PREFIX:-$(pwd)/build}"
SRC_DIR="$(dirname "${BASH_SOURCE[0]}")"
source "${SRC_DIR}/env.sh"
@@ -14,8 +14,9 @@ if [[ "$OSTYPE" == "linux-gnu" ]]; then
make -j4
make install
cd -
- rm -f "$prefix/libsalticidae.a"
- ln -sv "$SALTICIDAE_PATH/build/lib/libsalticidae.a" "$prefix/libsalticidae.a"
+ mkdir -p "$PREFIX"
+ rm -f "$PREFIX/libsalticidae.a"
+ ln -sv "$SALTICIDAE_PATH/build/lib/libsalticidae.a" "$PREFIX/libsalticidae.a"
elif [[ "$OSTYPE" == "darwin"* ]]; then
brew install Determinant/salticidae/salticidae
else