UPSTREAM: util/abuild: Add more error handling for command line options
- Show an error if a directory is added after the command line options to catch scripts using the old parameters. - If an invalid parameter is specified, show the parameter. BUG=None BRANCH=None TEST=None Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/17741 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Patrick Georgi <pgeorgi@google.com> Change-Id: Ie8948361f1c51e89a99bdb13df8c554747cd521d Reviewed-on: https://chromium-review.googlesource.com/419626 Commit-Ready: Furquan Shaikh <furquan@chromium.org> Tested-by: Furquan Shaikh <furquan@chromium.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
parent
7f66f08b3e
commit
97a6776ac0
1 changed files with 4 additions and 1 deletions
|
|
@ -676,10 +676,13 @@ while true ; do
|
|||
configoptions="$(cat "$1")${configoptions}\n"
|
||||
shift;;
|
||||
--) shift; break;;
|
||||
-*) printf "Invalid option\n\n"; myhelp; exit 1;;
|
||||
-*) printf "Invalid option '%s'\n\n" "$1"; myhelp; exit 1;;
|
||||
*) break;;
|
||||
esac
|
||||
done
|
||||
if [ -n "$1" ]; then
|
||||
printf "Invalid option '%s'\n\n" "$1"; myhelp; exit 1;
|
||||
fi
|
||||
|
||||
if [ -z "$TARGET" ] || [ "$TARGET" = "/" ]; then
|
||||
echo "Please specify a valid, non-root build directory."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue