#! /usr/bin/perl -w $gSourcePath = shift; $gTargetPath = shift; @gSourceFiles = map($gSourcePath."/".$_, @ARGV); @gTargetFiles = map($gTargetPath."/".$_, @ARGV); for my $sFile (@gSourceFiles) { -e $sFile || die "Source file $sFile doesn't exist."; } for my $tFile (@gTargetFiles) { -e $tFile && die "Target file $tFile already exists."; } system("mv ".join(" ", @gSourceFiles)." ".$gTargetPath) == 0 || die("Moving failed."); system("cvs rm ".join(" ", @gSourceFiles)) == 0 || die("cvs rm failed"); system("cvs add ".join(" ", @gTargetFiles)) == 0 || die("cvs add failed");