summaryrefslogtreecommitdiff
path: root/Master/tlpkg/TeXLive/TLPOBJ.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Master/tlpkg/TeXLive/TLPOBJ.pm')
-rw-r--r--Master/tlpkg/TeXLive/TLPOBJ.pm19
1 files changed, 18 insertions, 1 deletions
diff --git a/Master/tlpkg/TeXLive/TLPOBJ.pm b/Master/tlpkg/TeXLive/TLPOBJ.pm
index 8a468fb7523..3f86288f9b3 100644
--- a/Master/tlpkg/TeXLive/TLPOBJ.pm
+++ b/Master/tlpkg/TeXLive/TLPOBJ.pm
@@ -381,9 +381,23 @@ sub _make_zip {
&TeXLive::TLUtils::debug("Not creating empty zip file $zipname\n");
return;
}
- &mkpath("$destdir") if (! -d "$destdir");
my $cwd = &getcwd;
+ if ("$destdir" !~ m@^/@) {
+ # we have an relative zipdir, so we have to make it absolute
+ $destdir = "$cwd/$destdir";
+ }
+ &mkpath("$destdir") if (! -d "$destdir");
chdir($tltree->svnroot);
+ # we add the .tlpobj into the .tlpobj directory
+ my $removetlpobjdir = 0;
+ if (! -d ".tlpobj") {
+ &mkpath(".tlpobj");
+ $removetlpobjdir = 1;
+ }
+ open(TMP,">.tlpobj/$self->{'name'}.tlpobj") or die "Cannot create .tlpobj/$self->{'name'}.tlpobj";
+ $self->writeout(\*TMP);
+ close(TMP);
+ push @files, ".tlpobj/$self->{'name'}.tlpobj";
unlink($zipname);
print $zipcmd . "$destdir/$zipname" . " > $nul\n" if ($::opt_debug);
open ZIP, $zipcmd . "$destdir/$zipname" . " > $nul";
@@ -395,6 +409,9 @@ sub _make_zip {
}
} @files;
close ZIP;
+ # cleaning up
+ unlink(".tlpobj/$self->{'name'}.tlpobj");
+ rmdir(".tlpobj") if $removetlpobjdir;
print "Done $zipname\n" if ($::opt_debug);
}