summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Shevchenko <[email protected]>2018-12-11 18:22:28 +0200
committerTom Rini <[email protected]>2018-12-26 18:24:26 -0500
commit94ca269049e2a57107c3d7a3713e8bfd054a2153 (patch)
tree060e7dcfb0f59b4be429dcdf835e1ba1dc5d52b8
parent562a63e86bc7b308a328a7bbdf0db237855c39a8 (diff)
scripts/check-config.sh: Add usage()
When arguments are not supplied the error message is misleading and doesn't tell what exactly has to be done. Fix this by adding usage() and call it if above circumstance occurs. Signed-off-by: Andy Shevchenko <[email protected]> Reviewed-by: Simon Glass <[email protected]>
-rwxr-xr-xscripts/check-config.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/scripts/check-config.sh b/scripts/check-config.sh
index 4848ca6e25a..583f7d0963c 100755
--- a/scripts/check-config.sh
+++ b/scripts/check-config.sh
@@ -17,6 +17,15 @@
set -e
set -u
+PROG_NAME="${0##*/}"
+
+usage() {
+ echo "$PROG_NAME <path to u-boot.cfg> <path to whitelist file> <source dir>"
+ exit 1
+}
+
+[ $# -ge 3 ] || usage
+
path="$1"
whitelist="$2"
srctree="$3"