my $wd = $src."\\pismere";\r
\r
if ($rverb =~ /checkout/) {\r
- print "\n\nHEADS UP!!\n\n";\r
- print "/REPOSITORY CHECKOUT will cause everything under $wd to be deleted.\n";\r
- print "If this is not what you intended, here's your chance to bail out!\n\n\n";\r
- print "Are you sure you want to remove everything under $wd? ";\r
- my $char = getc;\r
- if (! ($char =~ /y/i)) {die "Info -- operation aborted by user."}\r
- !system("rm -rf $wd/*") or die "Fatal -- Couldn't clean $wd.";\r
- !system("rmdir $wd") or die "Fatal -- Couldn't remove $wd.";\r
-# !system("attrib -h -r $wd\\* /s /d") or die "Fatal -- Couldn't clear read-only attributes.";\r
-# !system("del /s /q $wd\\*.*") or die "Fatal -- Couldn't clean files from $wd."; \r
-# !system("rm -rf $wd\\*.*") or die "Fatal -- Couldn't clean directories from $wd.";\r
+ if (-d $wd) {\r
+ print "\n\nHEADS UP!!\n\n";\r
+ print "/REPOSITORY CHECKOUT will cause everything under $wd to be deleted.\n";\r
+ print "If this is not what you intended, here's your chance to bail out!\n\n\n";\r
+ print "Are you sure you want to remove everything under $wd? ";\r
+ my $char = getc;\r
+ if (! ($char =~ /y/i)) {die "Info -- operation aborted by user."}\r
+ !system("rm -rf $wd/*") or die "Fatal -- Couldn't clean $wd.";\r
+ !system("rmdir $wd") or die "Fatal -- Couldn't remove $wd.";\r
+ }\r
+ if (! -d $src) {mkdir $src or die "Fatal -- Couldn't create $src.";}\r
+ if (! -d $wd) {mkdir $wd or die "Fatal -- Couldn't create $wd.";}\r
+ if (! -d "$wd//CVS") {mkdir "$wd//CVS" or die "Fatal -- Couldn't create $wd\\CVS.";}\r
}\r
\r
# Begin logging:\r
\r
# Set up cvs environment variables:\r
$ENV{CVSROOT} = $fetch[0]->{CVSROOT}->{name};\r
- chdir($src) or die "Fatal -- couldn't chdir to $src\n";\r
- print "Info -- chdir to ".`cd`."\n" if ($verbose);\r
+ chdir($src) or die "Fatal -- couldn't chdir to $src\n";\r
+ print "Info -- chdir to ".`cd`."\n" if ($verbose);\r
my $krb5dir = $wd."\\athena\\auth\\krb5";\r
\r
my $cvscmdroot = "cvs $rverb";\r
if ($rverb =~ /checkout/) { \r
my @cvsmodules = ( \r
'krb', \r
- 'pismere/athena/util/lib/afscompat', \r
'pismere/athena/util/lib/delaydlls', \r
'pismere/athena/util/lib/getopt', \r
'pismere/athena/util/guiwrap'\r
);\r
-# 'pismere/athena/util/lib', \r
\r
foreach my $module (@cvsmodules) {\r
$cvscmd = $cvscmdroot." ".$module;\r
$cvscmd .= " ".$tags[0]->{cvs}->{value} if ($tags[0]->{cvs}->{value});\r
if ($verbose) {print "Info -- cvs command: $cvscmd\n";}\r
- !system($cvscmd) or die "Fatal -- command \"$cvscmd\" failed; return code $?\n";\r
+ !system($cvscmd) or die "Fatal -- command \"$cvscmd\" failed; return code $?\n";\r
}\r
}\r
else { ## Update.\r
$cvscmd = $cvscmdroot;\r
$cvscmd .= " ".$tags[0]->{cvs}->{value} if ($tags[0]->{cvs}->{value});\r
if ($verbose) {print "Info -- cvs command: $cvscmd\n";}\r
- !system($cvscmd) or die "Fatal -- command \"$cvscmd\" failed; return code $?\n";\r
+ !system($cvscmd) or die "Fatal -- command \"$cvscmd\" failed; return code $?\n";\r
}\r
\r
# Set up svn environment variables:\r