From 917ec1e2f14840dab9a019e0bb8f1dee5de25ddf Mon Sep 17 00:00:00 2001 From: Yug Gupta Date: Thu, 7 May 2020 13:15:49 +0530 Subject: [PATCH] prepare: exit when passed incorrect parameters Now script does not continue execution when an invalid argument is passed. Signed-off-by: Yug Gupta --- prepare.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/prepare.sh b/prepare.sh index 792a08c4b..c2ff11fc0 100755 --- a/prepare.sh +++ b/prepare.sh @@ -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