diff options
author | Khaled Hosny <khaledhosny@eglug.org> | 2011-10-16 20:11:19 +0200 |
---|---|---|
committer | Khaled Hosny <khaledhosny@eglug.org> | 2011-10-16 20:11:28 +0200 |
commit | dd9421f8766b46a1080a09de6153e7615bac1f02 (patch) | |
tree | a70b7f967c4d35997c29c65ffc201936bd2cf8a1 | |
parent | 8ead3332393b829e6dd500c5cae4ed7502f6a47c (diff) | |
download | luaotfload-dd9421f8766b46a1080a09de6153e7615bac1f02.tar.gz |
More cleanup
-rwxr-xr-x | mkluatexfontdb.lua | 2 | ||||
-rw-r--r-- | otfl-font-nms.lua | 20 |
2 files changed, 11 insertions, 11 deletions
diff --git a/mkluatexfontdb.lua b/mkluatexfontdb.lua index 2cc67c9..bc90d39 100755 --- a/mkluatexfontdb.lua +++ b/mkluatexfontdb.lua @@ -39,7 +39,7 @@ Valid options: The output database file is named otfl-fonts.lua and is placed under: %s" -]], name, names.path.localdir)) +]], name, names.path.dir)) end local function version_msg() diff --git a/otfl-font-nms.lua b/otfl-font-nms.lua index 06c6dad..4417613 100644 --- a/otfl-font-nms.lua +++ b/otfl-font-nms.lua @@ -14,8 +14,8 @@ local names_dir = "luatex-cache/generic/names" names.version = 2.010 -- not the same as in context names.data = nil names.path = { - basename = "otfl-names.lua", - localdir = file.join(kpse.expand_var("$TEXMFVAR"), names_dir), + basename = "otfl-names.lua", + dir = file.join(kpse.expand_var("$TEXMFVAR"), names_dir), } local success = pcall(require, "luatexbase.modutils") @@ -63,7 +63,7 @@ local function make_name(path) end local function load_names() - local path = file.join(names.path.localdir, names.path.basename) + local path = file.join(names.path.dir, names.path.basename) local luaname, lucname = make_name(path) local foundname local data @@ -729,17 +729,17 @@ local function update_names(fontnames, force) end local function save_names(fontnames) - local savepath = names.path.localdir - if not lfs.isdir(savepath) then - dir.mkdirs(savepath) + local path = names.path.dir + if not lfs.isdir(path) then + dir.mkdirs(path) end - savepath = file.join(savepath, names.path.basename) - if file.iswritable(savepath) then - local luaname, lucname = make_name(savepath) + path = file.join(path, names.path.basename) + if file.iswritable(path) then + local luaname, lucname = make_name(path) table.tofile(luaname, fontnames, true) caches.compile(fontnames,luaname,lucname) logs.info("Font names database saved") - return savepath + return path else logs.info("Failed to save names database") return nil |