From ee1c809d23ce322e7946f941545f7e0fa27ae5c6 Mon Sep 17 00:00:00 2001 From: Context Git Mirror Bot Date: Wed, 7 Oct 2015 14:15:06 +0200 Subject: 2015-10-07 12:05:00 --- scripts/context/lua/mtx-context.lua | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) (limited to 'scripts') diff --git a/scripts/context/lua/mtx-context.lua b/scripts/context/lua/mtx-context.lua index 3c78532d8..36893f45c 100644 --- a/scripts/context/lua/mtx-context.lua +++ b/scripts/context/lua/mtx-context.lua @@ -1028,15 +1028,17 @@ do -- more or less copied from mtx-plain.lua: end end fmtpathspec = string.splitlines(fmtpathspec)[1] or fmtpathspec - fmtpathspec = file.splitpath(fmtpathspec) + fmtpathspec = fmtpathspec and file.splitpath(fmtpathspec) local fmtpath = nil - for i=1,#fmtpathspec do - local path = fmtpathspec[i] - if path ~= "." then - dir.makedirs(path) - if lfs.isdir(path) and file.is_writable(path) then - fmtpath = path - break + if fmtpathspec then + for i=1,#fmtpathspec do + local path = fmtpathspec[i] + if path ~= "." then + dir.makedirs(path) + if lfs.isdir(path) and file.is_writable(path) then + fmtpath = path + break + end end end end @@ -1060,6 +1062,17 @@ do -- more or less copied from mtx-plain.lua: end make_mkii_format = function(name,engine) + + -- let the binary sort it out + + os.setenv('SELFAUTOPARENT', "") + os.setenv('SELFAUTODIR', "") + os.setenv('SELFAUTOLOC', "") + os.setenv('TEXROOT', "") + os.setenv('TEXOS', "") + os.setenv('TEXMFOS', "") + os.setenv('TEXMFCNF', "") + make(engine,name) end -- cgit v1.2.3