From a2e72bae8665825f7bdfcdb6b77ef730fb25f49b Mon Sep 17 00:00:00 2001 From: Chris Harding Date: Wed, 23 Aug 2017 18:17:03 +0000 Subject: [PATCH] Fix install.sh false success report bug install() & remove() will now return an error code if any of the commands fail. --- install.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/install.sh b/install.sh index e4a8cda..c4384e4 100755 --- a/install.sh +++ b/install.sh @@ -15,18 +15,18 @@ fi # Define functions function uninstall { - rm -f $VERBOSE $BINLOC + rm -f $VERBOSE $BINLOC && rm -rf $VERBOSE $SRCLOC } function install { # Sed was being fussy on FreeBSD, used ed, the one true text editor - printf "1a\nSRCLOC=$SRCLOC\n.\n,p\n" | ed -s run-scripts/halibot > $BINLOC - chmod +x $BINLOC + printf "1a\nSRCLOC=$SRCLOC\n.\n,p\n" | ed -s run-scripts/halibot > $BINLOC && + chmod +x $BINLOC && - mkdir -p $SRCLOC - cp $VERBOSE main.py $SRCLOC - cp -r $VERBOSE halibot $SRCLOC/halibot + mkdir -p $SRCLOC && + cp $VERBOSE main.py $SRCLOC && + cp -r $VERBOSE halibot $SRCLOC/halibot && cp -r $VERBOSE packages $SRCLOC/packages }