From e5bbf2dc033c74684563b4035f3863ee61c12d2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20A=2E=20Ortega=20Froysa?= Date: Tue, 8 Nov 2022 16:02:38 +0100 Subject: [PATCH] Test for too few commands. --- isidore.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/isidore.sh b/isidore.sh index 46fb3a1..0bccb5d 100755 --- a/isidore.sh +++ b/isidore.sh @@ -204,6 +204,12 @@ function build_project() set_config_vars +if [ $# -lt 1 ] +then + echo "No subcommand was specified. Use the 'help' subcommand." + exit 1 +fi + case $1 in new) if [ $# -lt 2 ] @@ -224,7 +230,7 @@ case $1 in then NEW_DIR="$i" else - echo "Unknown argument for new '$i'. Use the 'help' command." + echo "Unknown argument for new '$i'. Use the 'help' subcommand." print_usage exit 1 fi @@ -242,7 +248,7 @@ case $1 in version) echo "$PROJECT_NAME v$ISIDORE_VERSION";; *) - echo "Unknown command $1. Use the 'help' command." + echo "Unknown command $1. Use the 'help' subcommand." print_usage exit 1;; esac