diff options
author | Hans Hagen <pragma@wxs.nl> | 2023-03-06 15:17:09 +0100 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2023-03-06 15:17:09 +0100 |
commit | e12b4fabeb0ce3ce6d256b54250cf38a8f940561 (patch) | |
tree | b574cb45fe8a416e60c912a8e2d754abdad3b63c /tex/context/base/mkiv/data-ini.lua | |
parent | 23b5ef45e7939a00addff726d02d6c29243177af (diff) | |
download | context-e12b4fabeb0ce3ce6d256b54250cf38a8f940561.tar.gz |
2023-03-06 14:47:00
Diffstat (limited to 'tex/context/base/mkiv/data-ini.lua')
-rw-r--r-- | tex/context/base/mkiv/data-ini.lua | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tex/context/base/mkiv/data-ini.lua b/tex/context/base/mkiv/data-ini.lua index 6cf5669b3..c36e0bb9c 100644 --- a/tex/context/base/mkiv/data-ini.lua +++ b/tex/context/base/mkiv/data-ini.lua @@ -109,6 +109,26 @@ do ownbin = file.collapsepath(ownbin) ownpath = file.collapsepath(ownpath) + -- We need to follow the symlink on osx - texlive. This only works luametatex and + -- lmtx so we might as wel forget abnotu luatex/mkiv there. The regular context + -- installation doesn't have this link issue. + + local symlinktarget = lfs.symlinktarget + + if symlinktarget then + while true do + local new = symlinktarget(ownpath) or ownpath + if new == ownpath then + break + else + ownpath = new + end + end + ownpath = file.collapsepath(ownpath) + else + lfs.symlinktarget = function() return nil end -- forget about it, luatex is frozen + end + if not ownpath or ownpath == "" or ownpath == "unset" then ownpath = args[-1] or arg[-1] ownpath = ownpath and filedirname(gsub(ownpath,"\\","/")) |