3 # $Id: cvsup,v 1.4 2002/11/05 16:59:40 rstory Exp $
14 echo "usage: $0 <working directory>"
20 if [ ! -d $DIR ]; then
21 echo "no such directory '$DIR'"
25 if [ ! -d $DIR/CVS ]; then
26 echo "'$DIR' has no CVS directory!"
30 if [ ! -f $DIR/CVS/Repository ]; then
31 echo "'$DIR' has no CVS/Repository!"
35 if [ ! -f $DIR/CVS/Root ]; then
36 echo "'$DIR' has no CVS/Root!"
40 if [ -f $DIR/CVS/Tag ]; then
41 TAG="-r `cat $DIR/CVS/Tag | cut -c 2-`"
44 REP="`cat $DIR/CVS/Repository`"
45 ROOT="`cat $DIR/CVS/Root`"
47 if [ "x$DIR" = "x." ]; then
48 COMMAND="cvs -q -z3 -d $ROOT update -P -d $TAG"
50 COMMAND="cvs -q -z3 -d $ROOT co $TAG -d $DIR $REP"
53 if [ ! -w $DIR/CVS ]; then
54 if [ -O $DIR/CVS ]; then
56 echo "Making $DIR writable"
61 echo "Updating directory $DIR with $TAG $REP..."
66 if [ $WO -eq 1 ]; then
67 echo "Making $DIR read-only"