diff options
author | Hans Hagen <pragma@wxs.nl> | 2017-05-14 19:58:50 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2017-05-14 19:58:50 +0200 |
commit | fd0c4577a4b6e85ca2db664906e1a03807ce133f (patch) | |
tree | fa23fcc04248d03ff82e34634b8ef1bb9cf28acb /tex/context/base/mkiv/grph-fil.lua | |
parent | db581096187dc2d3cbdbe4cdc39d247c168b1607 (diff) | |
download | context-fd0c4577a4b6e85ca2db664906e1a03807ce133f.tar.gz |
2017-05-14 19:15:00
Diffstat (limited to 'tex/context/base/mkiv/grph-fil.lua')
-rw-r--r-- | tex/context/base/mkiv/grph-fil.lua | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/tex/context/base/mkiv/grph-fil.lua b/tex/context/base/mkiv/grph-fil.lua index e774d097e..3c069da37 100644 --- a/tex/context/base/mkiv/grph-fil.lua +++ b/tex/context/base/mkiv/grph-fil.lua @@ -42,6 +42,16 @@ end job.register('job.files.collected', tobesaved, initializer) +local runner = sandbox.registerrunner { + name = "hashed context run", + program = "context", + template = [[%options% "%filename%"]], + checkers = { + options = "string", + filename = "readable", + } +} + function jobfiles.run(name,action) local usedname = addsuffix(name,inputsuffix) -- we assume tex if not set local oldchecksum = collected[usedname] @@ -55,7 +65,10 @@ function jobfiles.run(name,action) if ta == "function" then action(name) elseif ta == "string" and action ~= "" then + -- can be anything but we assume it gets checked by the sandbox os.execute(action) + elseif ta == "table" then + runner(action) else report_run("processing file, no action given for processing %a",name) end @@ -79,7 +92,7 @@ function jobfiles.context(name,options) else local result = replacesuffix(name,resultsuffix) if not done[result] then - jobfiles.run(name,"context ".. (options or "") .. " " .. name) + jobfiles.run(name, { options = options, filename = name }) done[result] = true end return result |