summaryrefslogtreecommitdiff
path: root/luaotfload-tool.lua
diff options
context:
space:
mode:
authorPhilipp Gesang <phg42.2a@gmail.com>2013-05-10 02:11:57 -0700
committerPhilipp Gesang <phg42.2a@gmail.com>2013-05-10 02:11:57 -0700
commitfb67cecbfa8707ece8d26f256b104616dc5810ee (patch)
tree4f4d0dad3f282cc543527cd4520261bfca73045c /luaotfload-tool.lua
parent2aeccd26f3cb654930ac4f310881c62ba2d796b4 (diff)
parent16fbe9db46002faa0b9e54214e42992cc3fdd7ba (diff)
downloadluaotfload-fb67cecbfa8707ece8d26f256b104616dc5810ee.tar.gz
Merge pull request #56 from phi-gamma/master
make node mode work again
Diffstat (limited to 'luaotfload-tool.lua')
-rwxr-xr-xluaotfload-tool.lua13
1 files changed, 13 insertions, 0 deletions
diff --git a/luaotfload-tool.lua b/luaotfload-tool.lua
index 0d3b229..2c525d9 100755
--- a/luaotfload-tool.lua
+++ b/luaotfload-tool.lua
@@ -90,6 +90,19 @@ config.lualibs.load_extended = false
require"lualibs"
+--- prepare directories: the cache function in Luatex-Fonts
+--- checks for writable directory only on startup, so everything
+--- has to be laid out before we load basics-gen
+
+local cachepath = kpse.expand_var"$TEXMFVAR"
+if not lfs.isdir(cachepath) then
+ dir.mkdirs(cachepath)
+ if not lfs.isdir(cachepath) then
+ texiowrite(stringformat(
+ "ERROR could not create directory %s", cachepath))
+ end
+end
+
--[[doc--
\fileent{luatex-basics-gen.lua} calls functions from the
\luafunction{texio.*} library; too much for our taste.