summaryrefslogtreecommitdiff
path: root/Master/tlpkg
diff options
context:
space:
mode:
authorPiotr Strzelczyk <piotr@eps.gda.pl>2011-05-11 08:09:49 +0000
committerPiotr Strzelczyk <piotr@eps.gda.pl>2011-05-11 08:09:49 +0000
commit59e21ae31739cf4bf7a5aa3f39426513eab200a9 (patch)
tree8b5fa5307875e63d637183ad57979a74081194d4 /Master/tlpkg
parent4f4158afdd779275d80205828c7d58559a9a7a86 (diff)
fix archive renaming
git-svn-id: svn://tug.org/texlive/trunk@22419 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg')
-rw-r--r--Master/tlpkg/dev/download-package-repository20
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;