diff options
author | Hakan Olsson <ho@cvs.openbsd.org> | 2001-11-14 20:00:07 +0000 |
---|---|---|
committer | Hakan Olsson <ho@cvs.openbsd.org> | 2001-11-14 20:00:07 +0000 |
commit | 863034e180bbcbfe43fb8040adaaea4f248f6d23 (patch) | |
tree | 155469aa7777fe9240668dcd5d7ff7b228783d25 /sys/kern | |
parent | e051d6040ce0f4bc213f6cb44a3cb790cb0be780 (diff) |
Better exit codes. ok mickey,millert,miod,deraadt
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/genassym.sh | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/kern/genassym.sh b/sys/kern/genassym.sh index dd7e09482f3..baf97d4196f 100644 --- a/sys/kern/genassym.sh +++ b/sys/kern/genassym.sh @@ -1,4 +1,4 @@ -# $OpenBSD: genassym.sh,v 1.6 2001/09/16 14:26:35 miod Exp $ +# $OpenBSD: genassym.sh,v 1.7 2001/11/14 20:00:06 ho Exp $ # $NetBSD: genassym.sh,v 1.9 1998/04/25 19:48:27 matthias Exp $ # @@ -36,7 +36,7 @@ awk=${AWK:-awk} -if [ $1 = '-c' ] ; then +if [ "x$1" = "x-c" ] ; then shift ccode=1 else @@ -162,6 +162,8 @@ if [ $ccode = 1 ] ; then else # Kill all of the "#" and "$" modifiers; locore.s already # prepends the correct "constant" modifier. - "$@" -S /tmp/$$.c -o -| sed -e 's/#//g' -e 's/\$//g' | \ - sed -n 's/.*XYZZY/#define/gp' + gentmp=/tmp/$$.c + ( "$@" -S ${gentmp} -o - || >${gentmp}.bad ) | \ + sed -e 's/#//g' -e 's/\$//g' | sed -n 's/.*XYZZY/#define/gp' + [ ! -f ${gentmp}.bad ] || ( rm -f ${gentmp}.bad; exit 1 ) fi |