Browse Source

support/scripts/genimage.sh: show usage when invoked incorrectly

[Peter: use ${0}]
Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Luca Ceresoli 6 years ago
parent
commit
6887ad7003
1 changed files with 5 additions and 1 deletions
  1. 5 1
      support/scripts/genimage.sh

+ 5 - 1
support/scripts/genimage.sh

@@ -1,7 +1,11 @@
 #!/usr/bin/env bash
 
 die() {
-  echo "Error: $@" >&2
+  cat <<EOF >&2
+Error: $@
+
+Usage: ${0} -c GENIMAGE_CONFIG_FILE
+EOF
   exit 1
 }