From: Kevin Day Date: Wed, 7 Mar 2012 04:18:02 +0000 (-0600) Subject: Update: improve operation parameter problem verbosity X-Git-Tag: 0.3.x~5 X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=715fe3c3315a917f4eee15e86cdea34d756827c9;p=fll Update: improve operation parameter problem verbosity Distinguish between failing because of invalid operation, failing because of multiple operations, and failing because no operation was given. --- diff --git a/build/scripts/generate.sh b/build/scripts/generate.sh index 54e59f4..04ca201 100644 --- a/build/scripts/generate.sh +++ b/build/scripts/generate.sh @@ -57,7 +57,7 @@ generate_main(){ elif [[ $operation == "" ]] ; then operation=$p else - operation=fail + operation=fail-multiple fi else if [[ $grab_next == "path_build" ]] ; then @@ -91,8 +91,12 @@ generate_main(){ generate_operation_build elif [[ $operation == "clean" ]] ; then generate_operation_clean - else + elif [[ $operation == "fail-multiple" ]] ; then echo -e "${c_error}ERROR: only one operation may be specified at a time.$c_reset" + elif [[ $operation == "" ]] ; then + echo -e "${c_error}ERROR: no operation was given.$c_reset" + else + echo -e "${c_error}ERROR: the operation $c_notice$operation$c_error was not recognized.$c_reset" fi }