Subject: Re: make -j and failure modes
To: Simon J. Gerraty <email@example.com>
From: James Chacon <jmc@NetBSD.org>
Date: 12/13/2003 11:36:37
On Sat, Dec 13, 2003 at 12:08:02AM -0800, Simon J. Gerraty wrote:
> On Sat, 13 Dec 2003 01:29:12 -0600, James Chacon writes:
> >This one presents a harder problem in correcting echo'ing commands and
> >seeing which one caused the error.
> Not sure I follow, can you elaborate?
Simply adding || exit $? (or not depending on whether - was in the command)
makes for a reasonably simple shell script. Basically take the current logic
and replace the set -e, set +e's with the exit's as needed.
Going with && between all commands (even newline separated and using sh -v)
will make setting up the script more complex in order to deal with these
sorts of things.
I think going with || exit $? and getting rid of -e is the best win here.
Making the job code anymore complicated than it is...scary :-)