From 12547b5d6f57b0c8032b1029ed90352f5ac39bdb Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Wed, 14 May 2014 22:34:48 +0200 Subject: [conf,tool] move status import to configuration --- src/luaotfload-configuration.lua | 4 ++++ src/luaotfload-tool.lua | 11 ++++------- 2 files changed, 8 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/luaotfload-configuration.lua b/src/luaotfload-configuration.lua index 9c634d4..535db30 100644 --- a/src/luaotfload-configuration.lua +++ b/src/luaotfload-configuration.lua @@ -21,6 +21,9 @@ luaotfload = luaotfload or { } config = config or { } config.luaotfload = { } +local status_file = "luaotfload-status" +local luaotfloadstatus = require (status_file) + local string = string local stringsub = string.sub local stringexplode = string.explode @@ -421,6 +424,7 @@ apply = function (old, new) end end end + result.status = luaotfloadstatus return result end diff --git a/src/luaotfload-tool.lua b/src/luaotfload-tool.lua index df19ca1..d2b6800 100755 --- a/src/luaotfload-tool.lua +++ b/src/luaotfload-tool.lua @@ -150,9 +150,6 @@ require "luaotfload-database" require "alt_getopt" local names = fonts.names -local status_file = "luaotfload-status" -local luaotfloadstatus = require (status_file) -config.luaotfload.status = luaotfloadstatus local sanitize_fontname = names.sanitize_fontname local log = luaotfload.log @@ -759,10 +756,10 @@ actions.loglevel = function (job) end actions.config = function (job) - local defaults = luaotfload.default_config - local vars = config.actions.read (job.extra_config) - config.luaotfload = config.actions.apply (defaults, vars) - config.luaotfload = config.actions.apply (config.luaotfload, job.config) + local defaults = luaotfload.default_config + local vars = config.actions.read (job.extra_config) + config.luaotfload = config.actions.apply (defaults, vars) + config.luaotfload = config.actions.apply (config.luaotfload, job.config) --inspect(config.luaotfload) --os.exit() -- cgit v1.2.3