summaryrefslogtreecommitdiff
path: root/compile_release.sh
diff options
context:
space:
mode:
authorSander Vrijders <sander.vrijders@ugent.be>2017-10-30 16:18:59 +0100
committerDimitri Staessens <dimitri.staessens@ugent.be>2017-10-30 16:29:23 +0100
commitf5c60ee47c097d7408470e4be6182bf9ee684e84 (patch)
treec2b47fdff985bf1d755b06467d22bbcaa0484ace /compile_release.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 <sander.vrijders@ugent.be> Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
Diffstat (limited to 'compile_release.sh')
-rwxr-xr-xcompile_release.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/compile_release.sh b/compile_release.sh
index e7e65ecc..a3b7dc2a 100755
--- a/compile_release.sh
+++ b/compile_release.sh
@@ -4,7 +4,7 @@ ME=compile_release
if (($# == 1 ))
then
- PREFIX=`echo "$1"|sed -e "s,\/$,,"`
+ PREFIX=${1/%\//}
else
PREFIX=""
fi
@@ -20,7 +20,7 @@ if test -n "$BUILDDIR" ; then
echo "$ME: Cannot create directory '$BUILDDIR'"
}
fi
-cd $BUILDDIR
+cd $BUILDDIR || exit 1
echo "$ME: Release directory will be '$RELEASEDIR'"
if test -n "$RELEASEDIR" ; then
@@ -28,7 +28,7 @@ if test -n "$RELEASEDIR" ; then
echo "$ME: Cannot create directory '$RELEASEDIR'"
}
fi
-cd $RELEASEDIR
+cd $RELEASEDIR || exit 1
cmake -DCMAKE_INSTALL_PREFIX=$PREFIX -DCMAKE_BUILD_TYPE=Release ../..