diff options
author | Sander Vrijders <[email protected]> | 2017-10-30 16:18:59 +0100 |
---|---|---|
committer | Dimitri Staessens <[email protected]> | 2017-10-30 16:29:23 +0100 |
commit | f5c60ee47c097d7408470e4be6182bf9ee684e84 (patch) | |
tree | c2b47fdff985bf1d755b06467d22bbcaa0484ace /install_release.sh | |
parent | 81cc401a4ef05a6bc5bcbda5ad27f8a60706aa02 (diff) | |
download | ouroboros-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_release.sh')
-rwxr-xr-x | install_release.sh | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/install_release.sh b/install_release.sh index 5bd56a42..fa6fe675 100755 --- a/install_release.sh +++ b/install_release.sh @@ -1,10 +1,8 @@ #!/usr/bin/env bash -ME=install_release - if (($# == 1 )) then - PREFIX=`echo "$1"|sed -e "s,\/$,,"` + PREFIX=${1/%\//} else PREFIX="" fi @@ -12,7 +10,7 @@ fi BUILDDIR=build RELEASEDIR=release -bash compile_release.sh $PREFIX +bash compile_release.sh "$PREFIX" -cd $BUILDDIR/$RELEASEDIR +cd $BUILDDIR/$RELEASEDIR || exit 1 make install |