summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/scripts/texlive/tlmgr.pl
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/scripts/texlive/tlmgr.pl')
-rwxr-xr-xMaster/texmf-dist/scripts/texlive/tlmgr.pl25
1 files changed, 9 insertions, 16 deletions
diff --git a/Master/texmf-dist/scripts/texlive/tlmgr.pl b/Master/texmf-dist/scripts/texlive/tlmgr.pl
index 3dd72b2c71f..0e114485086 100755
--- a/Master/texmf-dist/scripts/texlive/tlmgr.pl
+++ b/Master/texmf-dist/scripts/texlive/tlmgr.pl
@@ -21,7 +21,6 @@ $datrev =~ s/ \(.*$//;
$tlmgrversion = "$tlmgrrevision ($datrev)";
our $Master;
-our $ismain;
our $loadmediasrcerror;
our $packagelogfile;
our $packagelogged;
@@ -41,12 +40,6 @@ END {
BEGIN {
$^W = 1;
- $ismain = (__FILE__ eq $0);
- # WARNING
- # The only use anticipated for tlmgr.pl as library for the 2009 release
- # is the Windows w32client prototype script.
- # Unix-specific problems with use as library will probably go undetected.
-
# make subprograms (including kpsewhich) have the right path:
my $kpsewhichname;
if ($^O =~ /^MSWin/i) {
@@ -61,14 +54,8 @@ BEGIN {
} else {
$Master = __FILE__;
$Master =~ s,/*[^/]*$,,;
- if ($ismain) {
- $bindir = $Master;
- $Master = "$Master/../..";
- } else {
- # for the time being, this code will not be used or tested
- $Master = "$Master/../../..";
- # no code yet for $bindir; would have to detect platform
- }
+ $bindir = $Master;
+ $Master = "$Master/../..";
# make subprograms (including kpsewhich) have the right path:
$ENV{"PATH"} = "$bindir:$ENV{PATH}";
$kpsewhichname = "kpsewhich";
@@ -374,7 +361,7 @@ my %globaloptions = (
"version" => 1,
);
-main() if $ismain;
+main();
### main ##################################################################
@@ -438,6 +425,12 @@ sub main {
}
ddebug("arguments: @ARGV\n") if @ARGV;
+ # prepare for loading of lang.pl which expects $::lang and $::opt_lang
+ $::opt_lang = $config{"gui-lang"} if (defined($config{"gui-lang"}));
+ $::opt_lang = $opts{"gui-lang"} if (defined($opts{"gui-lang"}));
+ require("TeXLive/trans.pl");
+ load_translations();
+
if ($opts{"version"} || (defined $action && $action eq "version")) {
if ($::machinereadable) {
# give_version already is machinereadable aware