aboutsummaryrefslogtreecommitdiff
path: root/scripts/build.sh
diff options
context:
space:
mode:
authorDeterminant <[email protected]>2019-12-07 17:55:50 -0500
committerDeterminant <[email protected]>2019-12-07 17:55:50 -0500
commit36e6d45c4a54eb3df7071bbad39143c913738f71 (patch)
tree7557ab0c68d4efb9af8f7b5d85911c52d53b28cf /scripts/build.sh
parent22f7dcda45ed4f7753ac56150d73763857013fea (diff)
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