From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Sat, 29 Oct 2016 13:41:12 -0400 Subject: [U-Boot] [U-Boot, 2/6] travis-ci: use correct exit code on errors In-Reply-To: <20161026170536.2367-2-swarren@wwwdotorg.org> References: <20161026170536.2367-2-swarren@wwwdotorg.org> Message-ID: <20161029174112.GF18591@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Wed, Oct 26, 2016 at 11:05:32AM -0600, Stephen Warren wrote: > From: Stephen Warren > > 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 > Reviewed-by: Heiko Schocher Applied to u-boot/master, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: