From 05f1490edc37d6a5c28ec9ba4fbcc220cc8c9c50 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Fri, 22 Jun 2007 07:46:54 +0000 Subject: 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 --- Master/tlpkg/TeXLive/TLPOBJ.pm | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) 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); } -- cgit v1.2.3