summaryrefslogtreecommitdiff
path: root/install_debug.sh
diff options
context:
space:
mode:
authorSander Vrijders <[email protected]>2017-10-30 16:18:59 +0100
committerDimitri Staessens <[email protected]>2017-10-30 16:29:23 +0100
commitf5c60ee47c097d7408470e4be6182bf9ee684e84 (patch)
treec2b47fdff985bf1d755b06467d22bbcaa0484ace /install_debug.sh
parent81cc401a4ef05a6bc5bcbda5ad27f8a60706aa02 (diff)
downloadouroboros-f5c60ee47c097d7408470e4be6182bf9ee684e84.tar.gz
ouroboros-f5c60ee47c097d7408470e4be6182bf9ee684e84.zip
build: Improve bash scripts
This improves the bash scripts so they are less error prone. Mistakes were found using the parser on shellcheck.net Signed-off-by: Sander Vrijders <[email protected]> Signed-off-by: Dimitri Staessens <[email protected]>
Diffstat (limited to 'install_debug.sh')
-rwxr-xr-xinstall_debug.sh11
1 files changed, 9 insertions, 2 deletions
diff --git a/install_debug.sh b/install_debug.sh
index 8f39be00..277ca92d 100755
--- a/install_debug.sh
+++ b/install_debug.sh
@@ -1,9 +1,16 @@
#!/usr/bin/env bash
+if (($# == 1 ))
+then
+ PREFIX=${1/%\//}
+else
+ PREFIX="/usr/local/ouroboros"
+fi
+
BUILDDIR=build
DEBUGDIR=debug
-bash compile_debug.sh $1
+bash compile_debug.sh "$PREFIX"
-cd $BUILDDIR/$DEBUGDIR
+cd $BUILDDIR/$DEBUGDIR || exit 1
make install