scripts/check-config.sh: Add usage()
PATCH 1/1 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]>
--- scripts/check-config.sh | 9 +++++++++ 1 file changed, 9 insertions(+)
scripts/check-config.sh +9 -0
@@ -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"
Signature · 1 line
2.19.2
PATCH 1/1 scripts/check-config.sh: Add usage()
Quoted 10 lines · Andy Shevchenko
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]>--- scripts/check-config.sh | 9 +++++++++ 1 file changed, 9 insertions(+)
Reviewed-by Simon Glass <[email protected]>
PATCH 1/1 scripts/check-config.sh: Add usage()
In reply to Andy ShevchenkoQuoted 7 lines · Andy Shevchenko
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]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20181227/9bc42a78/attachment.sig>