summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElie Roux <elie.roux@telecom-bretagne.eu>2013-04-08 17:38:30 +0200
committerElie Roux <elie.roux@telecom-bretagne.eu>2013-04-08 17:38:30 +0200
commit28eebe8a17b640eb101e684b38efe836aa7ade73 (patch)
treee0c60205683376a33cf598e2b76770f58891e745
parenta38dcda19542af3e9d27e6792166a027e29a125b (diff)
downloadluaotfload-28eebe8a17b640eb101e684b38efe836aa7ade73.tar.gz
Fixing module loading in the script
Even though the script should not really be useful anymore, it might be useful for debugging purposes, so I think it's worth fixing it. It was crashing on require("lualibs"), unable to find the module; so I made it load luatexbase.loader.lua, in oder to fix it...
-rwxr-xr-xmkluatexfontdb.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/mkluatexfontdb.lua b/mkluatexfontdb.lua
index 4275c84..38b9daa 100755
--- a/mkluatexfontdb.lua
+++ b/mkluatexfontdb.lua
@@ -11,6 +11,14 @@ kpse.set_program_name("luatex")
function string.quoted(s) return string.format("%q",s) end -- XXX
+-- First we need to be able to load module (code copied from
+-- luatexbase-loader.sty):
+local file = "luatexbase.loader.lua"
+local path = assert(kpse.find_file(file, 'tex'),
+ "File '"..file.."' not found")
+texio.write_nl("("..path..")")
+dofile(path)
+
require("lualibs")
require("otfl-basics-gen.lua")
require("otfl-font-nms")