Exit with error code on parameter errors

This commit is contained in:
Asif Bacchus
2018-09-19 15:48:53 -06:00
parent 458a7d16e4
commit dadb83cff8
2 changed files with 2 additions and 2 deletions
View File
+2 -2
View File
@@ -60,7 +60,7 @@ errorExplain=()
# if no parameters provided, then show the help page and exit with error
if [ -z $1 ]; then
# show script help page
scriptHelp
scriptHelp 1
fi
# use GetOpts to process parameters
@@ -72,7 +72,7 @@ while getopts ':l:' PARAMS; do
;;
?)
# unrecognized parameters trigger scriptHelp
scriptHelp
scriptHelp 1
;;
esac
done