From 3b09b4e618308b59a9755758c113cbc46b542cbf Mon Sep 17 00:00:00 2001 From: Krystian Hebel Date: Mon, 20 Jan 2025 12:56:48 +0100 Subject: [PATCH] build.sh: print usage when no argument is passed Without it, the script failed with cryptic error: $ ./build.sh ./build.sh: line 259: $1: unbound variable Change-Id: I2472c3451d6754f978f39b23a3492ed369151861 Signed-off-by: Krystian Hebel --- build.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/build.sh b/build.sh index 24f9da66a6..9b993984a7 100755 --- a/build.sh +++ b/build.sh @@ -358,6 +358,11 @@ function build_odroid_h4 { fi } +if [ $# -lt 1 ]; then + usage + exit +fi + CMD="$1" case "$CMD" in