This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
wwwdocs/bin/preprocess - patch to give zero on success
- To: gcc-patches at gcc dot gnu dot org
- Subject: wwwdocs/bin/preprocess - patch to give zero on success
- From: Hans-Peter Nilsson <hp at bitrange dot com>
- Date: Wed, 16 Feb 2000 23:12:55 -0500 (EST)
Hi.
The script "preprocess" always gives nonzero (i.e. 1) exit status.
That's not good when it's used to check success, as by the htdig
update script (no, it's not fatal).
I must confess I managed to reset the dates of all web documents
by accidentally invoking preprocess with no arguments. :-(
Ok to install?
Index: preprocess
===================================================================
RCS file: /cvs/gcc/wwwdocs/bin/preprocess,v
retrieving revision 1.9
diff -p -c -r1.9 preprocess
*** preprocess 2000/02/16 00:05:00 1.9
--- preprocess 2000/02/17 03:50:35
*************** cleanup() {
*** 39,45 ****
rm -rf $TMPDIR $1
}
! trap "cleanup; exit 1" 0 1 2 15
####
# Process a single file.
--- 39,45 ----
rm -rf $TMPDIR $1
}
! trap "cleanup; exit 1" 1 2 15
####
# Process a single file.
*************** else
*** 107,109 ****
--- 107,113 ----
process_file $f
done
fi
+
+ # Get a clean exit status on success.
+ cleanup
+ exit 0
brgds, H-P