3 # RCS cleanup operation.
4 # $Header: /pub/NetBSD/misc/repositories/cvsroot/src/usr.bin/rcs/src/Attic/rcsclean.sh,v 1.1 1993/03/21 09:58:07 cgd Exp $
6 # This program removes working files which are copies of the latest
7 # revision on the default branch of the corresponding RCS files.
8 # For each file given, rcsclean performs a co operation for the latest
9 # revision on the default branch, and compares
10 # the result with the working file. If the two are identical,
11 # the working file is deleted.
13 # A typical application in a Makefile would be:
14 # clean:; rm *.o; rcsclean *.c *.o
16 # Limitation: This program doesn't work if given the name of
17 # an RCS file rather than the name of the working file.
19 PATH
=/usr
/new
/bin
:/usr
/local
/bin
:/bin
:/usr
/bin
:/usr
/ucb
23 echo "usage: $progname file ..."
24 echo "removes all working files that are checked in and are unchanged"
27 TMPFILE
=/tmp
/rcscl$$.tmp
28 while test $# -gt 0 ; do
30 co
-p -q $1 > $TMPFILE
34 chmod +w
$1; rm -f $1; rcs
-u -q $1