summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2012-01-31 15:12:34 +0000
committerNorbert Preining <preining@logic.at>2012-01-31 15:12:34 +0000
commitfb23f528da141c47435a00a9893233e6c628e469 (patch)
treebaa61f92980b806d1e8cafb8f0901935da5065e0 /Build
parentf505dabd443478b21eccd07affb9cd5979acdbe4 (diff)
* updmap.pl:
. support -showoption key that shows the current setting . fix not-acceptance of empty values in key/val -setoption git-svn-id: svn://tug.org/texlive/trunk@25256 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r--Build/source/texk/tetex/ChangeLog6
-rwxr-xr-xBuild/source/texk/tetex/updmap.pl33
2 files changed, 38 insertions, 1 deletions
diff --git a/Build/source/texk/tetex/ChangeLog b/Build/source/texk/tetex/ChangeLog
index a611278f2cd..7f7b248d0c4 100644
--- a/Build/source/texk/tetex/ChangeLog
+++ b/Build/source/texk/tetex/ChangeLog
@@ -1,3 +1,9 @@
+2012-02-01 Norbert Preining <preining@logic.at>
+
+ * updmap.pl:
+ . support -showoption key that shows the current setting
+ . fix not-acceptance of empty values in key/val -setoption
+
2012-01-19 Norbert Preining <preining@logic.at>
* updmap.pl:
diff --git a/Build/source/texk/tetex/updmap.pl b/Build/source/texk/tetex/updmap.pl
index da9202fb431..b662fb652cd 100755
--- a/Build/source/texk/tetex/updmap.pl
+++ b/Build/source/texk/tetex/updmap.pl
@@ -40,6 +40,7 @@ my (@psADOBE, @fileADOBE, @fileADOBEkb, @fileURW);
my $enableItem;
my @setoptions = ();
my @showoptions = ();
+my @showoption = ();
my @disableItem = ();
my $listmaps;
my $listavailablemaps;
@@ -126,6 +127,7 @@ Commands:
--help show this message and exit
--version show version information and exit
--showoptions ITEM show alternatives for options
+ --showoption ITEM show value of option
--setoption OPTION VALUE set option, where OPTION is one of:
LW35, dvipsPreferOutline, dvipsDownloadBase35,
pdftexDownloadBase14, pxdviUse, kanjiEmbed,
@@ -269,6 +271,7 @@ sub processOptions {
"setoption" =>
sub {die "$0: --setoption needs an option and value; try --help.\n"},
"showoptions=s" => \@showoptions,
+ "showoption=s" => \@showoption,
"syncwithtrees" => \$syncwithtrees,
"version" => sub { print &version(); exit(0); },
"h|help" => \$opt_help)) {
@@ -625,7 +628,7 @@ sub setOptions {
}
die "$0: unexpected empty key or val for options (@options), goodbye.\n"
- if !$key || !$val;
+ if !$key || !defined($val);
&setOption ($key, $val);
}
}
@@ -661,6 +664,28 @@ m/^(dvipsPreferOutline|dvipsDownloadBase35|(pdftex|dvipdfm)DownloadBase14|pxdviU
}
###############################################################################
+# showOption(item item ...)
+# show current value for an item
+#
+sub showOption {
+ sub doit {
+ my ($a, $b) = @_;
+ my $v = &cfgval($a);
+ $v = $b unless (defined $v);
+ print "$a=$v\n";
+ }
+ foreach my $item (@_) {
+ doit("LW35", "URWkb") if ($item eq "LW35");
+ doit("dvipsPreferOutline", 1) if ($item eq "dvipsPreferOutline");
+ doit("dvipsDownloadBase35", 1) if ($item eq "dvipsDownloadBase35");
+ doit("pdftexDownloadBase14", 1) if ($item eq "pdftexDownloadBase14");
+ doit("kanjiEmbed", "noEmbed") if ($item eq "kanjiEmbed");
+ doit("kanjiVariant", "") if ($item eq "kanjiVariant");
+ doit("pxdviUse", 0) if ($item eq "pxdviUse");
+ }
+}
+
+###############################################################################
# showOptions(item)
# show Options for an item
#
@@ -1028,6 +1053,8 @@ sub mkMaps {
. ($dvipsDownloadBase35 ? "true" : "false")
. "\n download standard fonts (pdftex) : "
. ($pdftexDownloadBase14 ? "true" : "false")
+ . "\n kanjiEmbed/variant replacement : "
+ . "$kanjiEmbed/$kanjiVariant"
. "\n create a mapfile for pxdvi : "
. ($pxdviUse ? "true" : "false")
. "\n\n");
@@ -1431,6 +1458,10 @@ sub main {
&setupCfgFile;
+ if (@showoption) {
+ &showOption(@showoption);
+ exit 0;
+ }
if ($listmaps) {
&listMaps ('list');
exit 0;