This script should update your CVS checkouts appropriately to work with
the new repository location.  Usage is:

./reroot.sh [<username>] [<directory>]

Where <username> is your username for SourceForge (only necessary if
you don't have an anonymous checkout) and <directory> is the location
of your checkout--. will be used if you don't specify this argument.

This is a quick hack, so no guarantees that it works properly.

----------------------------------------------------------------------
#!/bin/sh

dir=$1
user=
if [ "x$dir" != x -a ! -d $dir ]; then
    user="$dir@"
    dir=$2
fi
if [ "x$dir" = x ]; then
    dir=`pwd`
fi

roots=`find $dir -name Root -print | grep 'CVS/Root'`

for root in $roots; do
    cat $root | awk -F: "
        \$3 == \"[EMAIL PROTECTED]\" {
            print \":\" \$2
                \":[EMAIL PROTECTED]:/cvsroot/undernet-ircu\";
            exit;
        }
        {
            print \"${user}cvs.undernet.org:/cvsroot/undernet-ircu\";
        }" > $root.new
    mv $root.new $root
done

-- 
Kevin L. Mitchell <[EMAIL PROTECTED]>

Reply via email to