diff options
-rwxr-xr-x | Master/tlpkg/bin/create-package-list | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/Master/tlpkg/bin/create-package-list b/Master/tlpkg/bin/create-package-list index b6ccacd9cec..a57d004e012 100755 --- a/Master/tlpkg/bin/create-package-list +++ b/Master/tlpkg/bin/create-package-list @@ -16,6 +16,7 @@ BEGIN { use strict; use TeXLive::TLPDB; +use TeXLive::TLUtils qw(dirname); use Getopt::Long; use Pod::Usage; @@ -29,7 +30,15 @@ die "$0: missing tlpdb argument; try --help if you need it.\n" if ($#ARGV<0); die "cannot read tlpdb file $ARGV[0]." if (! -r "$ARGV[0]"); -my $tldb = new TeXLive::TLPDB ( root => "$ARGV[0]" ); +# backwards compatibility +my $root; +if ("$ARGV[0]" =~ m,texlive.tlpdb$,) { + $root = dirname(dirname("$ARGV[0]")); +} else { + $root = "$ARGV[0]"; +} + +my $tldb = new TeXLive::TLPDB ( root => "$root" ); $tldb->generate_packagelist; |