summaryrefslogtreecommitdiff
path: root/mkluatexfontdb.lua
diff options
context:
space:
mode:
authoreroux <elie.roux@telecom-bretagne.eu>2010-03-03 11:25:23 +0100
committereroux <elie.roux@telecom-bretagne.eu>2010-03-03 11:25:23 +0100
commitb3776c161877c03691a4a4b2d6f1c302995112ae (patch)
tree5807cc7c2489717441c5c91cd70619fef61f5aa7 /mkluatexfontdb.lua
parent8e504aea583057b70c34e71cd24af1f8cc648fa1 (diff)
downloadluaotfload-b3776c161877c03691a4a4b2d6f1c302995112ae.tar.gz
Changing the database directory to TEXMFVAR/scripts/luatexfontdb
Diffstat (limited to 'mkluatexfontdb.lua')
-rw-r--r--mkluatexfontdb.lua11
1 files changed, 6 insertions, 5 deletions
diff --git a/mkluatexfontdb.lua b/mkluatexfontdb.lua
index 66fc231..a34b81e 100644
--- a/mkluatexfontdb.lua
+++ b/mkluatexfontdb.lua
@@ -31,7 +31,7 @@ names.version = names.version or 2.004
-- the path to add to TEXMFVAR or TEXMFSYSVAR to get the final directory in
-- normal cases
-mkluatexfontdb.subtexmfvardir = "/tex/"
+mkluatexfontdb.subtexmfvardir = "/scripts/luatexfontdb/"
-- the directory in which the database will be saved, can be overwritten
mkluatexfontdb.directory = kpse.expand_var("$TEXMFVAR") .. mkluatexfontdb.subtexmfvardir
@@ -57,7 +57,8 @@ Valid options:
--sys writes the database for the whole system
(default is only for the user)
-The output database file is named otfl-fonts.lua.
+The output database file is named otfl-fonts.lua. By default it is placed
+in TEXMFVAR/scripts/luatexfontdb/.
]], name))
end
@@ -149,8 +150,8 @@ do_run_fc_cache(run_fc_cache)
-- the status table is containing correspondances between absolute path and last modification
-- timestamp, it's uses to save time during update, by not reparsing unchanged fonts.
local status = nil
-local status_file = mkluatexfontdb.directory .. '/' .. "otfl-names-status.lua"
-if lfs.isfile(status_file) then
+local status_file = mkluatexfontdb.directory .. "/otfl-names-status.lua"
+if file.isreadable(status_file) then
status = dofile(status_file)
end
@@ -159,7 +160,7 @@ local function generate(force)
local savepath = mkluatexfontdb.directory
if not lfs.isdir(savepath) then
log("creating directory %s", savepath)
- lfs.mkdir(savepath)
+ dir.mkdirs(savepath)
if not lfs.isdir(savepath) then
texio.write_nl(string.format("Error: cannot create directory '%s', exiting.\n", savepath))
os.exit(1)