diff options
author | 2017-08-16 16:28:39 +0000 | |
---|---|---|
committer | 2017-08-16 16:28:39 +0000 | |
commit | 9a9222df5272a20e147d5a5496e5987a6981c19b (patch) | |
tree | 50634f04e98ad863e5f3962f68ab40a800ae4265 /bootstrap/vagrant-onap/tools/run.sh | |
parent | a57fb1414b932fa449f51efa5d8314d2f5c4843a (diff) | |
parent | 90e9c749aeb30015e5a1482ac666e6cab3d50765 (diff) |
Merge "Fix run.sh arguments"
Diffstat (limited to 'bootstrap/vagrant-onap/tools/run.sh')
-rwxr-xr-x | bootstrap/vagrant-onap/tools/run.sh | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/bootstrap/vagrant-onap/tools/run.sh b/bootstrap/vagrant-onap/tools/run.sh index 6ba4a1020..cf31fe4c7 100755 --- a/bootstrap/vagrant-onap/tools/run.sh +++ b/bootstrap/vagrant-onap/tools/run.sh @@ -1,14 +1,11 @@ #!/bin/bash -usage () -{ -cat <<EOF -Usage: run.sh [-y] [-?] Command +function usage { + cat <<EOF +Usage: run.sh Command [-y] [-?] Optional arguments: -y Skips warning prompt. - -? - Shows help about this program. -s <suite> Test suite to use in testing mode. -c <case> @@ -24,9 +21,9 @@ run=false test_suite="*" test_case="*" -COMMAND=${@: -1} +COMMAND=$1 -while getopts "y?s:c:" OPTION; do +while getopts "ys:c:" OPTION "${@:2}"; do case "$OPTION" in y) run=true @@ -47,9 +44,9 @@ while getopts "y?s:c:" OPTION; do fi test_case=$OPTARG ;; - ?) + \?) usage - exit 0 + exit 1 ;; esac done |