summaryrefslogtreecommitdiff
path: root/luaotfload-tool.lua
diff options
context:
space:
mode:
authorPhilipp Gesang <phg42.2a@gmail.com>2013-05-11 14:10:56 +0200
committerPhilipp Gesang <phg42.2a@gmail.com>2013-05-11 14:10:56 +0200
commit3c7d3b4817ea273b48f15e556c5978765a7b981d (patch)
tree11e4832f378c3d5d716b0747739205bb2e752dde /luaotfload-tool.lua
parent7b1ed699d2d798b693413f9dcc8bd7dde73f839c (diff)
downloadluaotfload-3c7d3b4817ea273b48f15e556c5978765a7b981d.tar.gz
implement ``--dry-run`` for filesystem tracing
Diffstat (limited to 'luaotfload-tool.lua')
-rwxr-xr-xluaotfload-tool.lua7
1 files changed, 5 insertions, 2 deletions
diff --git a/luaotfload-tool.lua b/luaotfload-tool.lua
index 2942782..686a343 100755
--- a/luaotfload-tool.lua
+++ b/luaotfload-tool.lua
@@ -282,7 +282,7 @@ end
actions.generate = function (job)
local fontnames, savedname
- fontnames = names.update(fontnames, job.force_reload)
+ fontnames = names.update(fontnames, job.force_reload, job.dry_run)
logs.names_report("info", 2, "db",
"Fonts in the database: %i", #fontnames.mappings)
local success = names.save(fontnames)
@@ -535,6 +535,7 @@ local process_cmdline = function ( ) -- unit -> jobspec
local long_options = {
alias = 1,
cache = 1,
+ ["dry-run"] = "D",
["flush-lookups"] = "l",
fields = 1,
find = 1,
@@ -551,7 +552,7 @@ local process_cmdline = function ( ) -- unit -> jobspec
version = "V",
}
- local short_options = "lfFiquvVh"
+ local short_options = "DfFilquvVh"
local options, _, optarg =
alt_getopt.get_ordered_opts (arg, short_options, long_options)
@@ -610,6 +611,8 @@ local process_cmdline = function ( ) -- unit -> jobspec
elseif v == "cache" then
action_pending["cache"] = true
result.cache = optarg[n]
+ elseif v == "D" then
+ result.dry_run = true
end
end