]> Kevux Git Server - fll/commitdiff
Update: improve operation parameter problem verbosity
authorKevin Day <kevin@kevux.org>
Wed, 7 Mar 2012 04:18:02 +0000 (22:18 -0600)
committerKevin Day <kevin@kevux.org>
Wed, 7 Mar 2012 04:19:40 +0000 (22:19 -0600)
Distinguish between failing because of invalid operation, failing because of multiple operations, and failing because no operation was given.

build/scripts/generate.sh

index 54e59f4a7eba51cd09f3eef18ff7d14a4fb80273..04ca201b00f3d1239141f15887d5ad53a97ec797 100644 (file)
@@ -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
 }