mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-28 15:41:40 +00:00
travis-ci: use correct exit code on errors
The phrase "if [ $? -ne 0 ]; then exit $?; fi" doesn't work correctly; by the time the "exit" statement runs, $? has already been over-written by the result of the [ command. Fix this by explicitly storing $? and then using that stored value in both the test and the error-case exit statement. This change also converts from textual comparison to integer comparison, since the exit code is an integer and there's no need to convert it to a string for comparison. Signed-off-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Heiko Schocher <hs@denx.de>
This commit is contained in:
parent
43a68e49e1
commit
0c5145fc29
1 changed files with 4 additions and 3 deletions
|
@ -70,11 +70,12 @@ script:
|
|||
- if [[ "${BUILDMAN}" != "" ]]; then
|
||||
set +e;
|
||||
tools/buildman/buildman ${BUILDMAN};
|
||||
if [[ "$?" == "0" || "$?" == "129" ]]; then
|
||||
ret=$?;
|
||||
if [[ $ret -eq 0 || $ret -eq 129 ]]; then
|
||||
exit 0;
|
||||
else
|
||||
exit $?;
|
||||
fi
|
||||
exit $ret;
|
||||
fi;
|
||||
fi
|
||||
|
||||
matrix:
|
||||
|
|
Loading…
Reference in a new issue