Skip to content
Snippets Groups Projects
Commit f4e560a6 authored by Wouter Deconinck's avatar Wouter Deconinck Committed by Wouter Deconinck
Browse files

Only print help on options with -[a-zA-Z]*

parent c5ee0b47
No related branches found
No related tags found
1 merge request!170Make view12/14/15 parallel (one slice per job)
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
function print_the_help { function print_the_help {
echo "USAGE: $0 -i <PRIM_FILE> " echo "USAGE: $0 -i <PRIM_FILE> <slices ...> "
echo " OPTIONS: " echo " OPTIONS: "
echo " -t,--tag filename tag (default: view1)" echo " -t,--tag filename tag (default: view1)"
exit exit
...@@ -53,12 +53,16 @@ do ...@@ -53,12 +53,16 @@ do
shift # past argument shift # past argument
shift # past value shift # past value
;; ;;
*) # unknown option -[a-zA-Z]*) # unknown option
#POSITIONAL+=("$1") # save it in an array for later #POSITIONAL+=("$1") # save it in an array for later
echo "unknown option $1" echo "unknown option $1"
print_the_help print_the_help
shift # past argument shift # past argument
;; ;;
*) # positional options
#POSITIONAL+=("$1") # save it in an array for later
shift # past argument
;;
esac esac
done done
set -- "${POSITIONAL[@]}" # restore positional parameters set -- "${POSITIONAL[@]}" # restore positional parameters
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment