setupcvstree 1.29 KB
#!/bin/sh
#
# scripts to setup a blank cvs tree
#

# Get the environment variables
. ./CHANGEME

# prompt user to make sure we don't do something bad
echo
echo
echo About to create CVS source tree with 3 modules
echo	$CVSROOT/PR
echo	$CVSROOT/HW
echo	$CVSROOT/MISC
echo
echo If this is the correct tree, type yes to continue, no to quit
read REPLY
if test $REPLY != "yes"
then
        echo QUIT!!!
        exit 0
fi

echo `dirname $CVSROOT/PR`

/usr/local/bin/cvs -d $CVSROOT init

# check in dummy file so we can create a blank tree

DUMMYDIR=/usr/tmp/dummydir
rm -rf $DUMMYDIR
mkdir $DUMMYDIR
cd $DUMMYDIR
touch dummy
echo blank tree created using a dummy file

#It is important that we name PR, HW and MISC in the repository argument in
# "cvs import -m 'Post 2.0G Source Transfer' repository SGI 2.0G+"
#because cvs makes a directory by that name under $CVSROOT. Since N64
#source tree expect $ROOT/PR all over the place, this is a good idea.

/usr/local/bin/cvs import -m 'Post 2.0G Source Transfer' PR SGI Rel2_0G
/usr/local/bin/cvs import -m 'Post 2.0G Source Transfer' HW SGI Rel2_0G
/usr/local/bin/cvs import -m 'Post 2.0G Source Transfer' MISC SGI Rel2_0G
rm -f $CVSROOT/PR/dummy,v
rm -f $CVSROOT/HW/dummy,v
rm -f $CVSROOT/MISC/dummy,v
echo cvs import is done

# cleanup
cd ..
rm -rf $DUMMYDIR
echo cleanup done