Personal tools
You are here: Home / Members / taus007's Home / Perl Script to Change All of Your CVS Roots
Navigation
Log in


Forgot your password?
 

Perl Script to Change All of Your CVS Roots

Run with 'find ./ -name 'Root' perl -exec updateCVS.pl {} \;

Plain Text icon updateCVS.pl — Plain Text, 1 KB

File contents

#!/usr/bin/perl -w

my $file = shift;
my $content = "";
open (FILE, $file) || die "Can't open $file: $!\n";
while (<FILE>)
  {
    s/\/product\/cmiss\/cvs/taus007\@cvs\.bioeng\.auckland\.ac\.nz\:\/cvs\/cmiss/g;
      $content .= "$_";
        }
        close(FILE);
        open (FILE, ">$file") || die "Can't open $file: $!\n";
        print FILE $content;
        close(FILE);