summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Gesang <phg42.2a@gmail.com>2013-09-01 23:49:14 +0200
committerPhilipp Gesang <phg42.2a@gmail.com>2013-09-01 23:49:14 +0200
commite29c39733ad90a0ca354808aef71b1b2e0acc9c9 (patch)
treeb265a51ed6b8cd1bb898511e2c516ba306be16e8
parent8bd26bbc573d4320fce8d6535737dd25e277bd2f (diff)
downloadluaotfload-e29c39733ad90a0ca354808aef71b1b2e0acc9c9.tar.gz
[tool] include stats on demand only (--stats option)
-rw-r--r--luaotfload-database.lua6
-rwxr-xr-xluaotfload-tool.lua9
2 files changed, 11 insertions, 4 deletions
diff --git a/luaotfload-database.lua b/luaotfload-database.lua
index 8268283..a148940 100644
--- a/luaotfload-database.lua
+++ b/luaotfload-database.lua
@@ -2795,7 +2795,11 @@ update_names = function (currentnames, force, dry_run)
dry_run,
n_rawnames,
n_newnames)
- targetnames.meta.statistics = collect_statistics (targetnames.mappings)
+
+ if config.luaotfload.statistics == true then
+ targetnames.meta.statistics = collect_statistics
+ (targetnames.mappings)
+ end
--- we always generate the file lookup tables because
--- non-texmf entries are redirected there and the mapping
diff --git a/luaotfload-tool.lua b/luaotfload-tool.lua
index 1ef74fb..9739e17 100755
--- a/luaotfload-tool.lua
+++ b/luaotfload-tool.lua
@@ -1068,6 +1068,7 @@ local process_cmdline = function ( ) -- unit -> jobspec
fields = 1,
find = 1,
force = "f",
+ formats = 1,
fuzzy = "F",
help = "h",
info = "i",
@@ -1079,14 +1080,14 @@ local process_cmdline = function ( ) -- unit -> jobspec
["prefer-texmf"] = "p",
quiet = "q",
["show-blacklist"] = "b",
- formats = 1,
+ stats = "S",
update = "u",
verbose = 1,
version = "V",
warnings = "w",
}
- local short_options = "bDfFiIlnpquvVhw"
+ local short_options = "bDfFiIlnpqSuvVhw"
local options, _, optarg =
alt_getopt.get_ordered_opts (arg, short_options, long_options)
@@ -1156,7 +1157,7 @@ local process_cmdline = function ( ) -- unit -> jobspec
result.cache = optarg[n]
elseif v == "D" then
result.dry_run = true
- elseif v == "p" then
+ elseif v == "p" then --- TODO adapt to new db structure
config.luaotfload.prioritize = "texmf"
elseif v == "b" then
action_pending["blacklist"] = true
@@ -1167,6 +1168,8 @@ local process_cmdline = function ( ) -- unit -> jobspec
names.set_font_filter (optarg[n])
elseif v == "n" then
config.luaotfload.update_live = false
+ elseif v == "S" then
+ config.luaotfload.statistics = true
end
end