summaryrefslogtreecommitdiff
path: root/Master/texmf
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2011-06-16 00:59:52 +0000
committerNorbert Preining <preining@logic.at>2011-06-16 00:59:52 +0000
commit035e3a0025335e2932d383db8982a19ab8857ce8 (patch)
treea14c22a10cac686207985eba0246943aa1846ab8 /Master/texmf
parentfe5b877423cce9b29d52cfa28539671e1f67c9ca (diff)
support option that runs tlmgr generate updmap automatically
git-svn-id: svn://tug.org/texlive/trunk@23004 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf')
-rwxr-xr-xMaster/texmf/scripts/texlive/tlmgr.pl21
1 files changed, 15 insertions, 6 deletions
diff --git a/Master/texmf/scripts/texlive/tlmgr.pl b/Master/texmf/scripts/texlive/tlmgr.pl
index 4784eea5358..42cd3573c2a 100755
--- a/Master/texmf/scripts/texlive/tlmgr.pl
+++ b/Master/texmf/scripts/texlive/tlmgr.pl
@@ -585,15 +585,27 @@ sub handle_execute_actions
$::files_changed = 0;
}
+ chomp(my $TEXMFSYSVAR = `kpsewhich -var-value=TEXMFSYSVAR`);
+ chomp(my $TEXMFSYSCONFIG = `kpsewhich -var-value=TEXMFSYSCONFIG`);
+ chomp(my $TEXMFLOCAL = `kpsewhich -var-value=TEXMFLOCAL`);
+
#
# maps handling
# if enabled and disabled -> do nothing
# if only enabled -> enable it
# if only disabled -> disable it
- {
+ # if the option "generate_updmap" is set, then simply ignore all that
+ # and run the equivalent of tlmgr generate updmap
+ my $run_full = 0;
+ if ($localtlpdb->option("generate_updmap")) {
+ my $dest = "$TEXMFSYSCONFIG/web2c/updmap.cfg";
+ my $localcfg = "$TEXMFLOCAL/web2c/updmap-local.cfg";
+ debug("$0: writing new updmap.cfg to $dest\n");
+ TeXLive::TLUtils::create_updmap($localtlpdb, $dest, $localcfg);
+ $run_full = 1;
+ } else {
my %do_enable;
my %do_disable;
- my $run_full = 0;
for my $m (keys %{$::execute_actions{'enable'}{'maps'}}) {
$run_full = 1;
$do_enable{$m} = 1;
@@ -617,13 +629,10 @@ sub handle_execute_actions
$::execute_actions{'enable'}{'maps'}{$m} . "=$m";
$errors += do_cmd_and_check($str);
}
- $errors += do_cmd_and_check("updmap-sys") if $run_full;
}
+ $errors += do_cmd_and_check("updmap-sys") if $run_full;
- chomp(my $TEXMFSYSVAR = `kpsewhich -var-value=TEXMFSYSVAR`);
- chomp(my $TEXMFLOCAL = `kpsewhich -var-value=TEXMFLOCAL`);
-
# format-regenerate is used when the paper size changes. In that
# case, if option("create_formats") is set, we simply want to generate