diff options
author | Karl Berry <karl@freefriends.org> | 2010-06-02 22:28:17 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2010-06-02 22:28:17 +0000 |
commit | 2a2fbc131c15823a6094173b0ae4b08d06500381 (patch) | |
tree | ce31ae0e565e3407d8e66fc3e6b0bc22b511642c /Master/bin/powerpc-aix/mtxrun | |
parent | 9714d2bea6b318b1d024e34b07d229c03f78eabb (diff) |
mtxrun/luatools automatically and silently create cache dir
git-svn-id: svn://tug.org/texlive/trunk@18700 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/bin/powerpc-aix/mtxrun')
-rwxr-xr-x | Master/bin/powerpc-aix/mtxrun | 38 |
1 files changed, 13 insertions, 25 deletions
diff --git a/Master/bin/powerpc-aix/mtxrun b/Master/bin/powerpc-aix/mtxrun index b99327692d7..d6b2d13a71a 100755 --- a/Master/bin/powerpc-aix/mtxrun +++ b/Master/bin/powerpc-aix/mtxrun @@ -8340,28 +8340,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 @@ -9328,8 +9313,11 @@ function resolvers.expand_variables() local expansions, environment, variables = { }, instance.environment, instance.variables local env = resolvers.env instance.expansions = expansions - if instance.engine ~= "" then environment['engine'] = instance.engine end - if instance.progname ~= "" then environment['progname'] = instance.progname end + local engine, progname = instance.engine, instance.progname + if type(engine) ~= "string" then instance.engine, engine = "", "" end + if type(progname) ~= "string" then instance.progname, progname = "", "" end + if engine ~= "" then environment['engine'] = engine end + if progname ~= "" then environment['progname'] = progname end for k,v in next, environment do local a, b = match(k,"^(%a+)%_(.*)%s*$") if a and b then @@ -10326,7 +10314,7 @@ caches.more = caches.more or "context" caches.direct = false -- true is faster but may need huge amounts of memory caches.tree = false caches.paths = caches.paths or nil -caches.force = false +caches.force = true -- changed for TEXLIVE by TH caches.defaults = { "TEXMFCACHE", "TMPDIR", "TEMPDIR", "TMP", "TEMP", "HOME", "HOMEPATH" } function caches.temp() |