summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/scripts
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2013-07-31 01:49:38 +0000
committerNorbert Preining <preining@logic.at>2013-07-31 01:49:38 +0000
commit1ff6fa9ac516aea0051ca83e39852d26cf2450c9 (patch)
treea07bdae9a35e4ff211beb1c3f52acdae859b2b8f /Master/texmf-dist/scripts
parentd0754ec6cc44caa05466f50889d23eaba1204edc (diff)
implement -sys option to updmap
git-svn-id: svn://tug.org/texlive/trunk@31320 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/scripts')
-rwxr-xr-xMaster/texmf-dist/scripts/texlive/updmap.pl25
1 files changed, 20 insertions, 5 deletions
diff --git a/Master/texmf-dist/scripts/texlive/updmap.pl b/Master/texmf-dist/scripts/texlive/updmap.pl
index db7bac6677a..2e2f40c0e6b 100755
--- a/Master/texmf-dist/scripts/texlive/updmap.pl
+++ b/Master/texmf-dist/scripts/texlive/updmap.pl
@@ -53,24 +53,32 @@ reset_root_home();
chomp(my $TEXMFDIST = `kpsewhich --var-value=TEXMFDIST`);
chomp(my $TEXMFVAR = `kpsewhich -var-value=TEXMFVAR`);
+chomp(my $TEXMFSYSVAR = `kpsewhich -var-value=TEXMFSYSVAR`);
chomp(my $TEXMFCONFIG = `kpsewhich -var-value=TEXMFCONFIG`);
+chomp(my $TEXMFSYSCONFIG = `kpsewhich -var-value=TEXMFSYSCONFIG`);
chomp(my $TEXMFHOME = `kpsewhich -var-value=TEXMFHOME`);
# make sure that on windows *everything* is in lower case for comparison
if (win32()) {
$TEXMFDIST = lc($TEXMFDIST);
$TEXMFVAR = lc($TEXMFVAR);
+ $TEXMFSYSVAR = lc($TEXMFSYSVAR);
$TEXMFCONFIG = lc($TEXMFCONFIG);
+ $TEXMFSYSCONFIG = lc($TEXMFSYSCONFIG);
$TEXMFROOT = lc($TEXMFROOT);
$TEXMFHOME = lc($TEXMFHOME);
}
+my $texmfconfig = $TEXMFCONFIG;
+my $texmfvar = $TEXMFVAR;
+
my %opts = ( quiet => 0, nohash => 0, nomkmap => 0 );
my $alldata;
my $updLSR;
my @cmdline_options = (
+ "sys",
"listfiles",
"cnffile=s@",
"copy",
@@ -157,6 +165,12 @@ sub main {
exit (0);
}
+ if ($opts{'sys'}) {
+ # we are running as updmap-sys, make sure that the right tree is used
+ $texmfconfig = $TEXMFSYSCONFIG;
+ $texmfvar = $TEXMFSYSVAR;
+ }
+
if ($opts{'dvipdfmoutputdir'} && !defined($opts{'dvipdfmxoutputdir'})) {
$opts{'dvipdfmxoutputdir'} = $opts{'dvipdfmoutputdir'};
printf STDERR "Using --dvipdfmoutputdir options for dvipdfmx, but please use --dvipdfmxoutputdir\n";
@@ -283,7 +297,7 @@ sub main {
# if none of the two exists, create a file in TEXMFCONFIG and use it
my $use_top = 0;
for my $f (@used_files) {
- if ($f =~ m!(\Q$TEXMFHOME\E|\Q$TEXMFCONFIG\E)/web2c/updmap.cfg!) {
+ if ($f =~ m!(\Q$TEXMFHOME\E|\Q$texmfconfig\E)/web2c/updmap.cfg!) {
$use_top = 1;
last;
}
@@ -292,7 +306,7 @@ sub main {
($changes_config_file) = @used_files;
} else {
# add the empty config file
- my $dn = "$TEXMFCONFIG/web2c";
+ my $dn = "$texmfconfig/web2c";
$changes_config_file = "$dn/updmap.cfg";
}
}
@@ -925,10 +939,10 @@ sub get_cfg {
sub mkMaps {
my $logfile;
- $logfile = "$TEXMFVAR/web2c/updmap.log";
+ $logfile = "$texmfvar/web2c/updmap.log";
if (! $opts{'dry-run'}) {
- mkdirhier("$TEXMFVAR/web2c");
+ mkdirhier("$texmfvar/web2c");
open LOG, ">$logfile"
or die "$prg: Can't open log file \"$logfile\": $!";
print LOG &version();
@@ -1292,7 +1306,7 @@ sub setupOutputDir {
if ($opts{'outputdir'}) {
$opts{$driver . "outputdir"} = $opts{'outputdir'};
} else {
- $opts{$driver . "outputdir"} = "$TEXMFVAR/fonts/map/$driver/updmap";
+ $opts{$driver . "outputdir"} = "$texmfvar/fonts/map/$driver/updmap";
}
}
my $od = $opts{$driver . "outputdir"};
@@ -2085,6 +2099,7 @@ Options:
--force recreate files even if config hasn't changed
--nomkmap do not recreate map files
--nohash do not run texhash
+ --sys run in system wide mode (equivalent to updmap-sys)
-n, --dry-run only show the configuration, no output
--quiet, --silent reduce verbosity