From 715fe3c3315a917f4eee15e86cdea34d756827c9 Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Tue, 6 Mar 2012 22:18:02 -0600 Subject: [PATCH] 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. --- build/scripts/generate.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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 } -- 1.8.3.1