summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2007-11-06 07:52:32 +0000
committerNorbert Preining <preining@logic.at>2007-11-06 07:52:32 +0000
commitc289387d07dc1febd333fa9c6a94b42049745ce6 (patch)
tree0ffbc9df4f59d00d3d3c4a1ba7931839bc2fa536
parentd9200d29c7317505f2c67d74ada691a6c277da9c (diff)
fix tlpsrc2zip, those chdir will drive me crazy ...
git-svn-id: svn://tug.org/texlive/trunk@5366 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/tlpkg/TeXLive/TLPOBJ.pm3
-rwxr-xr-xMaster/tlpkg/bin/tlpsrc2zip10
2 files changed, 10 insertions, 3 deletions
diff --git a/Master/tlpkg/TeXLive/TLPOBJ.pm b/Master/tlpkg/TeXLive/TLPOBJ.pm
index 0c16484e7d9..2de48ace3b5 100644
--- a/Master/tlpkg/TeXLive/TLPOBJ.pm
+++ b/Master/tlpkg/TeXLive/TLPOBJ.pm
@@ -362,7 +362,7 @@ sub make_zip {
$destdir = TeXLive::TLPOBJ->zipdir;
}
die("Undefined tltree argument!") if (not(defined($tltree)));
- # first build the arch independet part
+ # first build the arch independent part
$self->_make_zip($tltree,$destdir,$zipname,"all");
# now the $pkg.$arch.zip
if ($self->is_arch_dependent) {
@@ -443,6 +443,7 @@ sub _make_zip {
unlink(".tlpobj/$self->{'name'}.tlpobj");
rmdir(".tlpobj") if $removetlpobjdir;
}
+ chdir($cwd);
print "Done $zipname\n" if ($::opt_debug);
}
diff --git a/Master/tlpkg/bin/tlpsrc2zip b/Master/tlpkg/bin/tlpsrc2zip
index 13e28ea9628..ed4c2db3a9d 100755
--- a/Master/tlpkg/bin/tlpsrc2zip
+++ b/Master/tlpkg/bin/tlpsrc2zip
@@ -8,7 +8,7 @@
BEGIN {
$^W = 1;
- ($mydir = $0) =~ s,/[^/]*$,,;
+ chomp ($mydir = `dirname $0`);
unshift (@INC, "$mydir/..");
}
@@ -17,6 +17,7 @@ use strict;
use TeXLive::TLPSRC;
use TeXLive::TLPOBJ;
use TeXLive::TLTREE;
+use Cwd;
use Getopt::Long;
use Pod::Usage;
use File::Path;
@@ -49,6 +50,11 @@ sub main
if (! -d "$opt_outputdir") {
mkpath("$opt_outputdir") or die "Cannot mkdir $opt_outputdir!";
}
+ # we have an relative zipdir, so we have to make it absolute
+ my $cwd = &getcwd;
+ if ("$opt_outputdir" !~ m@^/@) {
+ $opt_outputdir = "$cwd/$opt_outputdir";
+ }
my $tlc = undef;
if (! -d $opt_catalogue) {
@@ -151,4 +157,4 @@ GNU General Public License Version 2 or later.
### tab-width: 2
### indent-tabs-mode: nil
### End:
-# vim:set tabstop=2: #
+# vim:set tabstop=2 expandtab: #