UPSTREAM: buildgcc: Show excessive arguments and bail out
Also remove a dead line that checks for unknown options: We already let `getopt` check that. BUG=None BRANCH=None TEST=None Signed-off-by: Nico Huber <nico.huber@secunet.com> Reviewed-on: https://review.coreboot.org/16681 Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com> Change-Id: I0e829b266e192757d6e455ee4cc608315bb4b7be Reviewed-on: https://chromium-review.googlesource.com/388325 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
01982a302f
commit
9aee342392
1 changed files with 6 additions and 1 deletions
|
|
@ -725,11 +725,16 @@ while true ; do
|
|||
-n|--nocolor) shift; \
|
||||
unset red RED green GREEN blue BLUE cyan CYAN NC;;
|
||||
--) shift; break;;
|
||||
-*) printf "Invalid option\n\n"; myhelp; exit 1;;
|
||||
*) break;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ $# -gt 0 ]; then
|
||||
printf "Excessive arguments: $*\n"
|
||||
myhelp
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -n "$PRINTSTABLE" ]; then
|
||||
print_stable
|
||||
exit 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue