#!/bin/csh
#  K. Devine  10/17/03
#  Script for resetting the CVS Root in existing repositories.
#  This script was written to allow existing working repositories to be
#  used after the CVS repository was moved to software.sandia.gov.
#
#  To use this script, change oldroot and newroot below to be your
#  old and new CVSROOT, respectively.
#  Run this script from the top-level Zoltan subdirectory to recursively
#  update the roots.
set oldroot = /Net/proj/zoltan/CVS
set newroot = kddevin@software.sandia.gov:/space/CVS-Zoltan
set string = "s|"$oldroot"|"$newroot"|g"
echo $string
set files = `find . -name "Root" -print`
foreach file ($files)
        echo $file
        /bin/mv $file tmpfile
        sed -e $string < tmpfile > $file
        /bin/rm tmpfile
end
set string = "s|"$oldroot"/||g"
echo $string
set files = `find . -name "Repository" -print`
foreach file ($files)
        echo $file
        /bin/mv $file tmpfile
        sed -e $string < tmpfile > $file
        /bin/rm tmpfile
end

