From 9f7e8c6215088aff14537a9f0ce335eed453fea0 Mon Sep 17 00:00:00 2001 From: Tom Yu Date: Fri, 30 Mar 2007 20:52:58 +0000 Subject: [PATCH] pull up r19288 from trunk r19288@cathode-dark-space: kpkoch | 2007-03-26 09:28:32 -0400 Target_Version: 1.6.1 Component: KfW Tags: pullup Ticket: new Subject: KfW build automation Don't fetch afscompat. Handle case of checkout into non-existent directory. ticket: 5490 git-svn-id: svn://anonsvn.mit.edu/krb5/branches/krb5-1-6@19349 dc483132-0cff-0310-8789-dd5450dbe970 --- src/windows/build/bkw.pl | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/src/windows/build/bkw.pl b/src/windows/build/bkw.pl index 3785cd438..5460ffa27 100644 --- a/src/windows/build/bkw.pl +++ b/src/windows/build/bkw.pl @@ -212,17 +212,19 @@ sub main { my $wd = $src."\\pismere"; if ($rverb =~ /checkout/) { - print "\n\nHEADS UP!!\n\n"; - print "/REPOSITORY CHECKOUT will cause everything under $wd to be deleted.\n"; - print "If this is not what you intended, here's your chance to bail out!\n\n\n"; - print "Are you sure you want to remove everything under $wd? "; - my $char = getc; - if (! ($char =~ /y/i)) {die "Info -- operation aborted by user."} - !system("rm -rf $wd/*") or die "Fatal -- Couldn't clean $wd."; - !system("rmdir $wd") or die "Fatal -- Couldn't remove $wd."; -# !system("attrib -h -r $wd\\* /s /d") or die "Fatal -- Couldn't clear read-only attributes."; -# !system("del /s /q $wd\\*.*") or die "Fatal -- Couldn't clean files from $wd."; -# !system("rm -rf $wd\\*.*") or die "Fatal -- Couldn't clean directories from $wd."; + if (-d $wd) { + print "\n\nHEADS UP!!\n\n"; + print "/REPOSITORY CHECKOUT will cause everything under $wd to be deleted.\n"; + print "If this is not what you intended, here's your chance to bail out!\n\n\n"; + print "Are you sure you want to remove everything under $wd? "; + my $char = getc; + if (! ($char =~ /y/i)) {die "Info -- operation aborted by user."} + !system("rm -rf $wd/*") or die "Fatal -- Couldn't clean $wd."; + !system("rmdir $wd") or die "Fatal -- Couldn't remove $wd."; + } + if (! -d $src) {mkdir $src or die "Fatal -- Couldn't create $src.";} + if (! -d $wd) {mkdir $wd or die "Fatal -- Couldn't create $wd.";} + if (! -d "$wd//CVS") {mkdir "$wd//CVS" or die "Fatal -- Couldn't create $wd\\CVS.";} } # Begin logging: @@ -241,8 +243,8 @@ sub main { # Set up cvs environment variables: $ENV{CVSROOT} = $fetch[0]->{CVSROOT}->{name}; - chdir($src) or die "Fatal -- couldn't chdir to $src\n"; - print "Info -- chdir to ".`cd`."\n" if ($verbose); + chdir($src) or die "Fatal -- couldn't chdir to $src\n"; + print "Info -- chdir to ".`cd`."\n" if ($verbose); my $krb5dir = $wd."\\athena\\auth\\krb5"; my $cvscmdroot = "cvs $rverb"; @@ -250,25 +252,23 @@ sub main { if ($rverb =~ /checkout/) { my @cvsmodules = ( 'krb', - 'pismere/athena/util/lib/afscompat', 'pismere/athena/util/lib/delaydlls', 'pismere/athena/util/lib/getopt', 'pismere/athena/util/guiwrap' ); -# 'pismere/athena/util/lib', foreach my $module (@cvsmodules) { $cvscmd = $cvscmdroot." ".$module; $cvscmd .= " ".$tags[0]->{cvs}->{value} if ($tags[0]->{cvs}->{value}); if ($verbose) {print "Info -- cvs command: $cvscmd\n";} - !system($cvscmd) or die "Fatal -- command \"$cvscmd\" failed; return code $?\n"; + !system($cvscmd) or die "Fatal -- command \"$cvscmd\" failed; return code $?\n"; } } else { ## Update. $cvscmd = $cvscmdroot; $cvscmd .= " ".$tags[0]->{cvs}->{value} if ($tags[0]->{cvs}->{value}); if ($verbose) {print "Info -- cvs command: $cvscmd\n";} - !system($cvscmd) or die "Fatal -- command \"$cvscmd\" failed; return code $?\n"; + !system($cvscmd) or die "Fatal -- command \"$cvscmd\" failed; return code $?\n"; } # Set up svn environment variables: -- 2.26.2