X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=scripts%2Fclam%2Fbadness_catcher.sh;h=e9b19f29023548ab52d93f2f33a4995a1d22f516;hb=47898c86d34ba851288b62281c14f18f7090df19;hp=9872891b4bf13e96bb1a9743b1e47d5f4c191f78;hpb=8f4a9f51cb240261e612504322fa250adf184884;p=feisty_meow.git diff --git a/scripts/clam/badness_catcher.sh b/scripts/clam/badness_catcher.sh old mode 100644 new mode 100755 index 9872891b..e9b19f29 --- a/scripts/clam/badness_catcher.sh +++ b/scripts/clam/badness_catcher.sh @@ -1,13 +1,22 @@ #!/bin/bash # badness_catcher: runs the command line passed in and catches error conditions. + #echo args are: $* -eval $* -ERR=$? # get exit status. +eval "$@" + +# get exit status. +ERR=$? + if [ $ERR -eq 0 ]; then exit; fi # exit if no error. -# print a complaint if there was an error. + +# print a complaint since there was an error. echo -echo "Error in project \"$PROJECT\"!" -echo " command=\"$*\"." +echo "=======================" echo +echo "Error in project: \"$PROJECT\"" +echo " command was: $*" +echo +echo "=======================" source $CLAM_DIR/exit_make.sh exit $ERR +