Hi, There is a bug in the PicoBSD build shell script in and I have no idea how to fix it. As a result, build errors are not caught. It is all to do with Exit Status of programs called from a shell script. Please help.
The code fragment from /usr/src/release/picobsd/build/build is ./stage1 2>&1 | tee stage1.out if [ "X$?" != "X0" ] ; then echo "^G" echo "-> ERROR in \"${i}\" script. Aborting the build process." exit 10 fi Build calls Stage1. Stage1 will return with an error code in some cases and we want to trap this and halt the Build script. ./stage1 2>&1 | tee stage1.out if [ "X$?" != "X0" ] ; then Normally, $? will return the Exit Status of the last executed program. However, due to the pipe through Tee, the Exit Status I get is the exit status of Tee and not the exit status of the Stage1 script. I still want to output the stage1 script to screen and a log file. How can I do this and preserve the exit status for the Build script. Thanks Roger -- Roger Hardiman ro...@freebsd.org To Unsubscribe: send mail to majord...@freebsd.org with "unsubscribe freebsd-hackers" in the body of the message