summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/mkiv/grph-fil.lua
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-04-19 23:04:15 +0000
committerKarl Berry <karl@freefriends.org>2017-04-19 23:04:15 +0000
commitf74161ca4e7eb3c5af9afcbe92522ae3b58987c1 (patch)
tree3c30a13df5ac7968195c85070a2b074578e669d2 /Master/texmf-dist/tex/context/base/mkiv/grph-fil.lua
parent1d5a55ac8f5506a7ae9cfca52f4b588182e199d4 (diff)
context beta/cont-tmf.zip (Apr 16 12:55)
git-svn-id: svn://tug.org/texlive/trunk@43931 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/base/mkiv/grph-fil.lua')
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/grph-fil.lua15
1 files changed, 14 insertions, 1 deletions
diff --git a/Master/texmf-dist/tex/context/base/mkiv/grph-fil.lua b/Master/texmf-dist/tex/context/base/mkiv/grph-fil.lua
index e774d097e6e..3c069da3736 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/grph-fil.lua
+++ b/Master/texmf-dist/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