diff options
Diffstat (limited to 'Master/tlpkg/dev/download-package-repository')
-rw-r--r-- | Master/tlpkg/dev/download-package-repository | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/Master/tlpkg/dev/download-package-repository b/Master/tlpkg/dev/download-package-repository index ae9399a4ae0..f2a9b057f35 100644 --- a/Master/tlpkg/dev/download-package-repository +++ b/Master/tlpkg/dev/download-package-repository @@ -71,6 +71,15 @@ sub main { } info("Cloning package repository from $location\n"); + $::archivedir = "__ARCHIVE__"; + if (-d "$::localrepo/$Archive") { + rename("$::localrepo/$Archive", "$::localrepo/$::archivedir") || + die "unable to rename $::localrepo/$Archive to $::archivedir: $!"; + } + if (!-d "$::localrepo/$::archivedir") { + mkdir("$::localrepo/$::archivedir") || + die "$0: could not create directory $::localrepo/$::archivedir: $!"; + } if (!-d "$::localrepo/$InfraLocation" ) { mkdir("$::localrepo/$InfraLocation") || die "$0: cannot create directory $::localrepo/$InfraLocation: $!"; @@ -100,15 +109,6 @@ sub main { die "unusable repository database at $location\n"; } - $::archivedir = "__ARCHIVE__"; - if (-d "$::localrepo/$Archive") { - rename("$::localrepo/$Archive", "$::archivedir") || - die "unable to rename $::localrepo/$Archive to $::archivedir: $!"; - } - if (!-d "$::localrepo/$::archivedir") { - mkdir("$::localrepo/$::archivedir") || - die "$0: could not create directory $::localrepo/$::archivedir: $!"; - } my $error_count = 0; for my $pkgname ($tlpdb->list_packages) { next if $pkgname =~ /^00texlive/; @@ -120,7 +120,7 @@ sub main { if ($tlp->srcfiles()); } if ($error_count == 0) { - rename("$::localrepo/$::archivedir", "$Archive") || + rename("$::localrepo/$::archivedir", "$::localrepo/$Archive") || die "unable to rename $::localrepo/$::archivedir to $Archive: $!"; print("Pacakge repository cloning finished successfully.\n"); return 0; |