3 # Copyright (c) 2000-2001 Silicon Graphics, Inc. All Rights Reserved.
5 # This program is free software; you can redistribute it and/or
6 # modify it under the terms of the GNU General Public License as
7 # published by the Free Software Foundation.
9 # This program is distributed in the hope that it would be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write the Free Software Foundation,
16 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 # Rebuild NNN.out files
21 # $Header: /build2/depot/linux/pcp/dev/qa/RCS/remake,v 2.11 1999/09/20 03:42:19 kenmcd Exp $
25 trap "rm -f NO-PREVIOUS-OUTPUT $tmp.*; exit" 0 1 2 3 15
27 # generic initialization
33 [ -f check.time ] || touch check.time
39 echo "Remake: cannot find \"$seq\""
42 lasttime=`sed -n -e "/^$seq /s/.* //p" <check.time`
43 [ "X$lasttime" != X ] && echo -n " ${lasttime}s"
44 rm -f $seq.bak $seq.full.bak
45 if sh $seq >$seq.new 2>&1
49 $diff $seq.out $seq.new
52 touch NO-PREVIOUS-OUTPUT
53 $diff NO-PREVIOUS-OUTPUT $seq.new
54 rm -f NO-PREVIOUS-OUTPUT
57 [ -f $seq.out ] && mv $seq.out $seq.bak
60 [ -f $seq.full.ok ] && mv $seq.full.ok $seq.full.bak
61 mv $seq.full $seq.full.ok
65 echo " - failed (exit status $?)"