[BACK]Return to remake CVS log [TXT][DIR] Up to [Development] / xfs-cmds / xfstests

File: [Development] / xfs-cmds / xfstests / remake (download)

Revision 1.6, Wed Nov 9 02:50:19 2005 UTC (11 years, 11 months ago) by nathans.longdrop.melbourne.sgi.com
Branch: MAIN
CVS Tags: HEAD
Changes since 1.5: +0 -29 lines

Update copyright annotations and license boilerplates to correspond with SGI Legals preferences.
Merge of master-melb:xfs-cmds:24329a by kenmcd.

#! /bin/sh
#
# Copyright (c) 2000-2001 Silicon Graphics, Inc.  All Rights Reserved.
#
# Rebuild NNN.out files
#
# $Header: /build2/depot/linux/pcp/dev/qa/RCS/remake,v 2.11 1999/09/20 03:42:19 kenmcd Exp $
#

tmp=/tmp/$$
trap "rm -f NO-PREVIOUS-OUTPUT $tmp.*; exit" 0 1 2 3 15

# generic initialization
iam=remake
. ./common.rc

. ./common

[ -f check.time ] || touch check.time

for seq in $list
do
    if [ ! -f $seq ]
    then
	echo "Remake: cannot find \"$seq\""
    else
	echo -n "$seq"
	lasttime=`sed -n -e "/^$seq /s/.* //p" <check.time`
	[ "X$lasttime" != X ] && echo -n " ${lasttime}s"
	rm -f $seq.bak $seq.full.bak
	if sh $seq >$seq.new 2>&1
	then
	    if [ -f $seq.out ]
	    then
		$diff $seq.out $seq.new
		rm -f $seq.out.bad
	    else
		touch NO-PREVIOUS-OUTPUT
		$diff NO-PREVIOUS-OUTPUT $seq.new
		rm -f NO-PREVIOUS-OUTPUT
	    fi
	    echo ""
	    [ -f $seq.out ] && mv $seq.out $seq.bak
	    if [ -f $seq.full ]
	    then
		[ -f $seq.full.ok ] && mv $seq.full.ok $seq.full.bak
		mv $seq.full $seq.full.ok
	    fi
	    mv $seq.new $seq.out
	else
	    echo " - failed (exit status $?)"
	    sed 's/^/	/' $seq.new
	    exit 1
	fi
    fi
done

exit 0