#! /bin/csh
# Find all of the files that are newer than the file "today" and create
# a tar file with them
set TODAY = today
if ($#argv > 0) then
    if ("$1" == "-help") then
        echo "$0 [ file  ]"
        echo "Makes a copy of tools containing all files newer than the named"
        echo "file.  If no file is provided, "'"'"today"'"'" is used.  The copy"
	echo "is a tar file new.tar"
        exit 1
    endif
    set TODAY = "$1"
endif
#
if (-e new.tar) /bin/rm new.tar

set ARCH = `bin/tarch`
if ($ARCH == dec5000 || $ARCH == c2mp || $ARCH == ipsc2 || $ARCH == cray) then
    # -prune not widespread enough...
    echo "update requires that find support the -prune option"
    exit(1)
endif

find . -name ref -prune -o -name man -prune -o -name blkslv -prune -o -name fort -prune -o \( -newer $TODAY -a -type f -a \! \( -name '*.a' -o -name '*.o' -o -name example -o -name 'example?' -o -name upshot -o -name xhist -o -name xedge -o -name xsum -o -name 'example?.sun4' -o -name 'rsum?.tex' -o -name doctext -o -name doc2lt \) \) -print > .foo
tar cf new.tar -I .foo

