X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=scripts%2Fclam%2Fbadness_catcher.sh;h=cc523e8dfa8c367d478320695af8e14b8754b5c0;hb=7c7d191539d4e5a94c4b39433e32b05deab44f24;hp=9872891b4bf13e96bb1a9743b1e47d5f4c191f78;hpb=2952ccf47b80174880141a7ecfa122089f349b8d;p=feisty_meow.git diff --git a/scripts/clam/badness_catcher.sh b/scripts/clam/badness_catcher.sh old mode 100755 new mode 100644 index 9872891b..cc523e8d --- a/scripts/clam/badness_catcher.sh +++ b/scripts/clam/badness_catcher.sh @@ -1,13 +1,24 @@ #!/bin/bash # badness_catcher: runs the command line passed in and catches error conditions. -#echo args are: $* -eval $* -ERR=$? # get exit status. + +if [ ! -z "$NOISY" ]; then + echo $* +fi +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 -source $CLAM_DIR/exit_make.sh +echo "Error in project: \"$PROJECT\"" +echo " command was: $*" +echo +echo "=======================" +source $CLAM_SCRIPTS/exit_make.sh exit $ERR +