summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/luat-iop.lua
blob: 34cc74e3ed1dcab7ac3a7e26db3f1da22dae8c30 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
if not modules then modules = { } end modules ['luat-iop'] = {
    version   = 1.001,
    comment   = "companion to luat-lib.mkiv",
    author    = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
    copyright = "PRAGMA ADE / ConTeXt Development Team",
    license   = "see context related readme files"
}

local cleanedpathlist = resolvers.cleanedpathlist
local registerroot    = sandbox.registerroot

sandbox.initializer {
    category = "files",
    action   = function()
        local function register(str,mode)
            local trees = cleanedpathlist(str)
            for i=1,#trees do
                registerroot(trees[i],mode)
            end
        end
        register("TEXMF","read")
        register("TEXINPUTS","read")
        register("MPINPUTS","read")
     -- register("TEXMFCACHE","write")
        registerroot(".","write")
    end
}