diff options
author | Philipp Gesang <phg42.2a@gmail.com> | 2014-07-24 22:20:47 +0200 |
---|---|---|
committer | Philipp Gesang <phg42.2a@gmail.com> | 2014-07-24 22:20:47 +0200 |
commit | 7c5c912858ba4b6ebd9d7f4f2e3bfa06171f6886 (patch) | |
tree | ab8d0b2ac65a98d2c21e321a78bfbee5f29f8609 /src/luaotfload-tool.lua | |
parent | 4482773d1e4bfc0105b478f7c0bfb8c5480af8a0 (diff) | |
parent | eb9d41d52ea5168284472a7290bce7a579ba1794 (diff) | |
download | luaotfload-7c5c912858ba4b6ebd9d7f4f2e3bfa06171f6886.tar.gz |
Merge pull request #238 from phi-gamma/master
2.5-2 / config dumper
Diffstat (limited to 'src/luaotfload-tool.lua')
-rwxr-xr-x | src/luaotfload-tool.lua | 36 |
1 files changed, 24 insertions, 12 deletions
diff --git a/src/luaotfload-tool.lua b/src/luaotfload-tool.lua index 89f5483..02c5a45 100755 --- a/src/luaotfload-tool.lua +++ b/src/luaotfload-tool.lua @@ -6,11 +6,11 @@ -- AUTHOR: Khaled Hosny, Élie Roux, Philipp Gesang -- VERSION: 2.5 -- LICENSE: GPL v2.0 --- MODIFIED: 2014-07-16 19:45:40+0200 +-- MODIFIED: 2014-07-24 22:10:32+0200 ----------------------------------------------------------------------- luaotfload = luaotfload or { } -local version = "2.5-1" --- <int: major>.<int: minor>-<int: fixes> +local version = "2.5-2" --- <int: major>.<int: minor>-<int: fixes> luaotfload.version = version luaotfload.self = "luaotfload-tool" @@ -739,9 +739,10 @@ set. --]]-- local action_sequence = { - "config", "loglevel", "help", "version", - "diagnose", "blacklist", "cache", "flush", - "bisect", "generate", "list", "query", + "config" , "loglevel" , "help" , "version" , + "dumpconf" , "diagnose" , "blacklist" , "cache" , + "flush" , "bisect" , "generate" , "list" , + "query" , } local action_pending = tabletohash(action_sequence, false) @@ -781,6 +782,11 @@ actions.version = function (job) return true, false end +actions.dumpconf = function (job) + config.actions.dump () + return true, false +end + actions.help = function (job) help_msg (job.help_version or "luaotfload-tool") return true, false @@ -1413,6 +1419,7 @@ local process_cmdline = function ( ) -- unit -> jobspec cache = 1, conf = 1, diagnose = 1, + dumpconf = 0, ["dry-run"] = "D", ["flush-lookups"] = "l", fields = 1, @@ -1551,15 +1558,20 @@ local process_cmdline = function ( ) -- unit -> jobspec result.bisect = optarg[n] action_pending.bisect = true elseif v == "conf" then - local extra = stringexplode (optarg[n], ",+") - if extra then - local extra_config = result.extra_config - if extra_config then - table.append (extra_config, extra) - else - result.extra_config = extra + local confname = optarg[n] + if confname then + local extra = stringexplode (optarg[n], ",+") + if extra then + local extra_config = result.extra_config + if extra_config then + table.append (extra_config, extra) + else + result.extra_config = extra + end end end + elseif v == "dumpconf" then + action_pending["dumpconf"] = true elseif v == "print-conf" then result.print_config = true end |