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>
This commit is contained in:
Luca Ceresoli 2017-12-09 22:29:59 +01:00 committed by Peter Korsgaard
parent 6bfa6b2a04
commit 6887ad7003

View File

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