diff options
author | Norbert Preining <preining@logic.at> | 2009-04-30 11:46:18 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2009-04-30 11:46:18 +0000 |
commit | 8fd14d6af79f1a0a3d81bb65d4db1d65b13dc419 (patch) | |
tree | 67a816c7f1ff2d207beffe8e1a48c706e416f933 | |
parent | 7fb15e92d2c842a6cf8582349525318bb773c87e (diff) |
tlmgr should find its modules even if there is no or a wrong kpsewhich
git-svn-id: svn://tug.org/texlive/trunk@12889 c570f23f-e606-0410-a88d-b1316a301751
-rwxr-xr-x | Master/texmf/scripts/texlive/tlmgr.pl | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/Master/texmf/scripts/texlive/tlmgr.pl b/Master/texmf/scripts/texlive/tlmgr.pl index 0d52aab61d6..22c9adf3410 100755 --- a/Master/texmf/scripts/texlive/tlmgr.pl +++ b/Master/texmf/scripts/texlive/tlmgr.pl @@ -38,9 +38,19 @@ BEGIN { $mydir =~ s,/[^/]*$,,; if (!$^O=~/^MSWin(32|64)$/i) { $ENV{"PATH"} = "$mydir:$ENV{PATH}"; + $kpsewhichname = "kpsewhich.exe"; + } else { + kpsewhichname = "kpsewhich"; } # - chomp($Master = `kpsewhich -var-value=SELFAUTOPARENT`); + if (! -r "$mydir/$kpsewhichname") { + # no kpsewhich in the same directory, so we are in a bootstrapping + # mode, use for Master $mydir/../.. + $Master = "$mydir/../.."; + } else { + chomp($Master = `kpsewhich -var-value=SELFAUTOPARENT`); + } + # # make Perl find our packages first: unshift (@INC, "$Master/tlpkg"); |