diff options
author | Taco Hoekwater <taco@elvenkind.com> | 2010-05-31 22:20:39 +0000 |
---|---|---|
committer | Taco Hoekwater <taco@elvenkind.com> | 2010-05-31 22:20:39 +0000 |
commit | 9d53ea527a51f9d0f434b60c80f6e91956b015e4 (patch) | |
tree | f2e5715e4f8e2704f0f1fc7bccca857df449a18d /Master/texmf-dist/tex/context/base/data-res.lua | |
parent | 016cf0b1f8cb5c3bc32b8d2b0e1ce07aeae78adf (diff) |
hotfix for luatools and mtxrun failing to find .lua files
in the TEXINPUTS tree.
git-svn-id: svn://tug.org/texlive/trunk@18656 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/base/data-res.lua')
-rw-r--r-- | Master/texmf-dist/tex/context/base/data-res.lua | 29 |
1 files changed, 7 insertions, 22 deletions
diff --git a/Master/texmf-dist/tex/context/base/data-res.lua b/Master/texmf-dist/tex/context/base/data-res.lua index ecef1418860..d1ae1f4f3f6 100644 --- a/Master/texmf-dist/tex/context/base/data-res.lua +++ b/Master/texmf-dist/tex/context/base/data-res.lua @@ -235,28 +235,13 @@ local function reset_hashes() end local function check_configuration() -- not yet ok, no time for debugging now - local ie, iv = instance.environment, instance.variables - local function fix(varname,default) - local proname = varname .. "." .. instance.progname or "crap" - local p, v = ie[proname], ie[varname] or iv[varname] - if not ((p and p ~= "") or (v and v ~= "")) then - iv[varname] = default -- or environment? - end - end - local name = os.name - if name == "windows" then - fix("OSFONTDIR", "c:/windows/fonts//") - elseif name == "macosx" then - fix("OSFONTDIR", "$HOME/Library/Fonts//;/Library/Fonts//;/System/Library/Fonts//") - else - -- bad luck - end - fix("LUAINPUTS" , ".;$TEXINPUTS;$TEXMFSCRIPTS") -- no progname, hm - -- this will go away some day - fix("FONTFEATURES", ".;$TEXMF/fonts/{data,fea}//;$OPENTYPEFONTS;$TTFONTS;$T1FONTS;$AFMFONTS") - fix("FONTCIDMAPS" , ".;$TEXMF/fonts/{data,cid}//;$OPENTYPEFONTS;$TTFONTS;$T1FONTS;$AFMFONTS") - -- - fix("LUATEXLIBS" , ".;$TEXMF/luatex/lua//") + if os.env["OSFONTDIR"] then + -- ok + elseif os.type == "windows" then + os.setenv("OSFONTDIR","c:/windows/fonts//") + elseif os.type == "macosx" then + os.setenv("OSFONTDIR","$HOME/Library/Fonts//;/Library/Fonts//;/System/Library/Fonts//") + end end function resolvers.bare_variable(str) -- assumes str is a string |