#############################################################
# Program to Migrate the existing source code in RCS to CVS
#
# Needs the korn shell RPM package pdksh*.rpm from Linux
# contrib cdrom
#############################################################
#
# rcs2cvs - convert source tree from RCS to CVS
#
# project to convert
PROJECT='project'
# current RCS root
RCSROOT="$HOME/rcs"
if cd "$RCSROOT/$PROJECT"
then
cd "$RCSROOT"
else
echo >&2 "`basename "$0"`: can't change to RCS directory '$RCSROOT/$PRO
JECT'."
exit 1
fi
# current CVS root
CVSROOT="$HOME/cvs"
# create new CVS directory for project 'project'
if mkdir "$CVSROOT/$PROJECT"
then
:
else
echo >&2 "`basename "$0"`: can't create CVS directory '$CVSROOT/$PROJEC
T'."
exit 2
fi
# create CVS project tree from RCS tree
find "$PROJECT" -type d -name RCS -print |
while read RCS
do
CVS="`dirname "$RCS"`"
(if cd "$RCS"
then
# if find . -type f -name '*,v' -print | cpio -pdmv "$CVSROOT/$CV
S"
if find . -type f -print | cpio -pdmv "$CVSROOT/$CVS"
then
:
else
echo >&2 "`basename "$0"`: can't convert RCS subdirecto
ry '$RCSROOT/$RCS' to CVS subdirectory '$CVSROOT/$CVS'."
fi
else
echo >&2 "`basename "$0"`: can't change to RCS subdirectory '$R
CSROOT/$RCS'."
fi)
done
_________________________________________________________________