From f5c60ee47c097d7408470e4be6182bf9ee684e84 Mon Sep 17 00:00:00 2001 From: Sander Vrijders Date: Mon, 30 Oct 2017 16:18:59 +0100 Subject: 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 Signed-off-by: Dimitri Staessens --- install_release.sh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'install_release.sh') 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 -- cgit v1.2.3