#2575: shell script gotcha in boot
---------------------------+------------------------------------------------
Reporter: pooryorick | Owner:
Type: bug | Status: new
Priority: normal | Component: Build System
Version: 6.8.3 | Severity: normal
Keywords: | Testcase:
Architecture: Unknown | Os: Unknown
---------------------------+------------------------------------------------
I use a build process which is sensitive to the exit code of "boot",
assuming that everything went OK only if it returns 0. Because the last
line of the script uses the && operator, the entire script can exit with a
code other than zero if the last file checked does not exist. In my case,
"validate" indeed did not exist, and the script failed.
Solution: Replace the && with an if statement:
{{{
if test -f $f; then
chmod +x $f
fi
}}}
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2575>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs