prepare: exit when passed incorrect parameters

Now script does not continue execution
when an invalid argument is passed.

Signed-off-by: Yug Gupta <ygupta@redhat.com>
This commit is contained in:
Yug Gupta 2020-05-07 13:15:49 +05:30 committed by Niels de Vos
parent 34b07b8ad9
commit 917ec1e2f1

View File

@ -18,6 +18,12 @@ opts=$(getopt \
-- "$@"
)
if [ $? -ne 0 ]
then
echo "Try '--help' for more information."
exit 1
fi
eval set -- ${opts}
while true; do