From ec22f80a4df73c67f9a4bfb128ee5065261cc452 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Fri, 10 May 2013 02:29:22 +0200 Subject: create $TEXMFVAR if missing --- luaotfload-tool.lua | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'luaotfload-tool.lua') 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. -- cgit v1.2.3