summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xMaster/texmf-dist/scripts/texlive/updmap.pl21
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;