diff options
author | Nico Huber <nico.huber@secunet.com> | 2016-09-20 14:11:53 +0200 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2016-09-21 17:02:05 +0200 |
commit | 78df0bf46deba1685ba1283e2575f90e62710cd5 (patch) | |
tree | 3cd073ceaa9d60da80a8cad4fdffe90615e22154 /util/crossgcc/buildgcc | |
parent | cc414dd47fd227962bded5605d6a277bb7b05939 (diff) | |
download | coreboot-78df0bf46deba1685ba1283e2575f90e62710cd5.tar.xz |
buildgcc: Check exit status of `getopt`
We accidentally checked the status of `eval` instead.
Change-Id: I1ba258944184ed707ed1f176e528d8266656cb59
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/16680
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'util/crossgcc/buildgcc')
-rwxr-xr-x | util/crossgcc/buildgcc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/util/crossgcc/buildgcc b/util/crossgcc/buildgcc index af6cbe2f11..0c0154691d 100755 --- a/util/crossgcc/buildgcc +++ b/util/crossgcc/buildgcc @@ -691,14 +691,16 @@ getoptbrand="$(getopt -V | sed -e '1!d' -e 's,^\(......\).*,\1,')" if [ "${getoptbrand}" = "getopt" ]; then # Detected GNU getopt that supports long options. args=$(getopt -l version,help,clean,directory:,bootstrap,platform:,languages:,package:,jobs:,destdir:,savetemps,scripting,ccache,supported:,urls,nocolor -o Vhcd:bp:l:P:j:D:tSys:un -- "$@") + getopt_ret=$? eval set -- "$args" else # Detected non-GNU getopt args=$(getopt Vhcd:bp:l:P:j:D:tSys:un $*) + getopt_ret=$? set -- $args fi -if [ $? != 0 ]; then +if [ $getopt_ret != 0 ]; then myhelp exit 1 fi |