From c691ee06f0537ebd67102838b200af71077034f6 Mon Sep 17 00:00:00 2001 From: Jovan Kostovski Date: Sat, 27 Jan 2018 00:02:48 +0100 Subject: [PATCH] show help and exit if no argument is provided Signed-off-by: Jovan Kostovski bugfix for the case where the script was started without an argument. The help was printed, but the _mainflux_docker was called as well, which was causing the following error: ./mainflux-docker.sh: line 163: $1: unbound variable --- bin/mainflux-docker.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/mainflux-docker.sh b/bin/mainflux-docker.sh index baa1bd37..989ccc54 100755 --- a/bin/mainflux-docker.sh +++ b/bin/mainflux-docker.sh @@ -203,6 +203,7 @@ _main() { # No arguments provided if [[ $# -eq 0 ]] ; then _print_help + exit 1 fi # Avoid complex option parsing when only one program option is expected.