summaryrefslogtreecommitdiffstats
path: root/bootstrap
diff options
context:
space:
mode:
Diffstat (limited to 'bootstrap')
-rw-r--r--bootstrap/vagrant-onap/CONTRIBUTING.md2
-rwxr-xr-xbootstrap/vagrant-onap/tools/run.sh17
2 files changed, 8 insertions, 11 deletions
diff --git a/bootstrap/vagrant-onap/CONTRIBUTING.md b/bootstrap/vagrant-onap/CONTRIBUTING.md
index f11327f9e..7341a10db 100644
--- a/bootstrap/vagrant-onap/CONTRIBUTING.md
+++ b/bootstrap/vagrant-onap/CONTRIBUTING.md
@@ -15,7 +15,7 @@ implementation of the _functions_ created on **_lib_** folder. In order to
display the Usage information you must execute the script with question mark as
an argument like follows:
- $ ./tools/run.sh -?
+ $ ./tools/run.sh
or using PowerShell
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