Jeff Trawick wrote:
>
>
> By the way... would a shell expert such as yourself know how to catch
> a bad exit from apache-1.3/src/Configure in the apache-1.3/configure
> code below and make sure that configure exits with a bad status too?
>
> if [ "x$quiet" = "xyes" ]; then
> (cd $src; ./Configure ${vflag} -file Configuration.apaci >/dev/null);
At this point, the error code from the sub-shell is available as $?
so you could use that result to expand your conditionals. So you
could check if $? was 0 and if not, exit $? to pop that error code
up to the next shell level (which would be the error code returned
by Configure)
> else
> (cd $src; ./Configure ${vflag} -file Configuration.apaci |\
> sed -e '/^Using config file:.*/d' \
> -e "s:Makefile in :Makefile in $src\\/:" \
> -e "s:Makefile\$:Makefile in $src:")
> fi
>
> Use case:
>
> Some dumbass like me sets CFLAGS to something bogus and runs
> configure... the bad CFLAGS causes the compiler sanity check to fail
> but configure exits with status 0 and a script that does the configure
> will keep on trucking until the build fails at a more confusing place.
>
> --
> Jeff Trawick | [EMAIL PROTECTED] | PGP public key at web site:
> http://www.geocities.com/SiliconValley/Park/9289/
> Born in Roswell... married an alien...
>
--
===========================================================================
Jim Jagielski [|] [EMAIL PROTECTED] [|] http://www.jaguNET.com/
"A society that will trade a little liberty for a little order
will lose both and deserve neither" - T.Jefferson