diff options
Diffstat (limited to 'Master/tlpkg/bin/tlpsrc2zip')
-rwxr-xr-x | Master/tlpkg/bin/tlpsrc2zip | 10 |
1 files changed, 8 insertions, 2 deletions
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: # |