summaryrefslogtreecommitdiff
path: root/Master/tlpkg/TeXLive
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2007-06-22 07:46:54 +0000
committerNorbert Preining <preining@logic.at>2007-06-22 07:46:54 +0000
commit05f1490edc37d6a5c28ec9ba4fbcc220cc8c9c50 (patch)
treeda5f4e609a5bb89edff09a4589947eace0dc52cd /Master/tlpkg/TeXLive
parent1f4ab23d281e6f076c295e23e19df4da266de8a4 (diff)
generated zip files now contain a TLPOBJ file in .tlpobj/$name.tlpobj
for installation purpose git-svn-id: svn://tug.org/texlive/trunk@4487 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/TeXLive')
-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);
}