mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-16 12:11:32 +00:00
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 <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
562a63e86b
commit
94ca269049
1 changed files with 9 additions and 0 deletions
|
@ -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"
|
||||
|
|
Loading…
Add table
Reference in a new issue