Skip to content

Commit 21afaa7

Browse files
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 <[email protected]>
1 parent 001d6f7 commit 21afaa7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

build.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,11 @@ function build_odroid_h4 {
256256
fi
257257
}
258258

259+
if [ $# -lt 1 ]; then
260+
usage
261+
exit
262+
fi
263+
259264
CMD="$1"
260265

261266
case "$CMD" in

0 commit comments

Comments
 (0)