diff options
author | Norbert Preining <preining@logic.at> | 2014-04-25 11:50:52 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2014-04-25 11:50:52 +0000 |
commit | da06d8cb34f0fc8924fb869b9a0b36a5d6539ab5 (patch) | |
tree | 45d71f74bc44ed1a1ce63258ea05463c7e9298fc /Master/texmf-dist | |
parent | d91a71b85bfd6b2c35cc17edbd67447698eb832e (diff) |
recognize hidden sys mode and react to it
git-svn-id: svn://tug.org/texlive/trunk@33679 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rwxr-xr-x | Master/texmf-dist/scripts/texlive/updmap.pl | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/Master/texmf-dist/scripts/texlive/updmap.pl b/Master/texmf-dist/scripts/texlive/updmap.pl index 0b3c508aad8..98fc7d0e561 100755 --- a/Master/texmf-dist/scripts/texlive/updmap.pl +++ b/Master/texmf-dist/scripts/texlive/updmap.pl @@ -3,7 +3,7 @@ # updmap - maintain map files for outline fonts. # (Maintained in TeX Live:Master/texmf-dist/scripts/texlive.) # -# Copyright 2011, 2012, 2013 Norbert Preining +# Copyright 2011, 2012, 2013, 2014 Norbert Preining # This file is licensed under the GNU General Public License version 2 # or any later version. # @@ -164,6 +164,25 @@ sub main { exit (0); } + # + # check if we are in *hidden* sys mode, in which case we switch + # to sys mode + # Nowdays we use -sys switch instead of simply overriding TEXMFVAR + # and TEXMFCONFIG + # This is used to warn users when they run updmap in usermode the first time. + # But it might happen that this script is called via another wrapper that + # sets TEXMFCONFIG and TEXMFVAR, and does not pass on the -sys option. + # for this case we check whether the SYS and non-SYS variants agree, + # and if, then switch to sys mode (with a warning) + if (($TEXMFSYSCONFIG eq $TEXMFCONFIG) && ($TEXMFSYSVAR eq $TEXMFVAR)) { + if (!$opts{'sys'}) { + warning("$prg: hidden sys mode found, switching to sys mode.\n"); + $opts{'sys'} = 1; + } + } + + + if ($opts{'sys'}) { # we are running as updmap-sys, make sure that the right tree is used $texmfconfig = $TEXMFSYSCONFIG; |