summaryrefslogtreecommitdiff
path: root/util/crossgcc
diff options
context:
space:
mode:
authorNico Huber <nico.huber@secunet.com>2016-09-20 14:16:43 +0200
committerPatrick Georgi <pgeorgi@google.com>2016-09-21 17:02:20 +0200
commitbd74d561adceab2a02629b7439cdb34f18e41c02 (patch)
tree2136caefa05874e493631f7a2c899959964df155 /util/crossgcc
parent78df0bf46deba1685ba1283e2575f90e62710cd5 (diff)
downloadcoreboot-bd74d561adceab2a02629b7439cdb34f18e41c02.tar.xz
buildgcc: Show excessive arguments and bail out
Also remove a dead line that checks for unknown options: We already let `getopt` check that. Change-Id: I0e829b266e192757d6e455ee4cc608315bb4b7be 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>
Diffstat (limited to 'util/crossgcc')
-rwxr-xr-xutil/crossgcc/buildgcc7
1 files changed, 6 insertions, 1 deletions
diff --git a/util/crossgcc/buildgcc b/util/crossgcc/buildgcc
index 0c0154691d..f96e2cf59e 100755
--- a/util/crossgcc/buildgcc
+++ b/util/crossgcc/buildgcc
@@ -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