summaryrefslogtreecommitdiff
path: root/tex/context/base/file-job.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/file-job.lua')
-rw-r--r--tex/context/base/file-job.lua44
1 files changed, 11 insertions, 33 deletions
diff --git a/tex/context/base/file-job.lua b/tex/context/base/file-job.lua
index c88eb7e9d..288a690d2 100644
--- a/tex/context/base/file-job.lua
+++ b/tex/context/base/file-job.lua
@@ -801,45 +801,23 @@ function commands.getcommandline() -- has to happen at the tex end in order to e
inputfile = basename(inputfile)
end
- local forcedruns = arguments.forcedruns
local kindofrun = arguments.kindofrun
- local currentrun = arguments.currentrun
- local maxnofruns = arguments.maxnofruns or arguments.runs
-
- -- context.setupsystem {
- -- [constants.directory] = validstring(arguments.setuppath),
- -- [constants.inputfile] = inputfile,
- -- [constants.file] = validstring(arguments.result),
- -- [constants.random] = validstring(arguments.randomseed),
- -- -- old:
- -- [constants.n] = validstring(kindofrun),
- -- [constants.m] = validstring(currentrun),
- -- }
+ local currentrun = arguments.maxnofruns
+ local maxnofruns = arguments.currentrun
context.setupsystem {
- directory = validstring(arguments.setuppath),
- inputfile = inputfile,
- file = validstring(arguments.result),
- random = validstring(arguments.randomseed),
+ [constants.directory] = validstring(arguments.setuppath),
+ [constants.inputfile] = inputfile,
+ [constants.file] = validstring(arguments.result),
+ [constants.random] = validstring(arguments.randomseed),
-- old:
- n = validstring(kindofrun),
- m = validstring(currentrun),
+ [constants.n] = validstring(kindofrun),
+ [constants.m] = validstring(currentrun),
}
- forcedruns = tonumber(forcedruns) or 0
- kindofrun = tonumber(kindofrun) or 0
- maxnofruns = tonumber(maxnofruns) or 0
- currentrun = tonumber(currentrun) or 0
-
- local prerollrun = forcedruns > 0 and currentrun > 0 and currentrun < forcedruns
-
- environment.forcedruns = forcedruns
- environment.kindofrun = kindofrun
- environment.maxnofruns = maxnofruns
- environment.currentrun = currentrun
- environment.prerollrun = prerollrun
-
- context.setconditional("prerollrun",prerollrun)
+ environment.kindofrun = tonumber(kindofrun) or 0
+ environment.maxnofruns = tonumber(maxnofruns) or 0
+ environment.currentrun = tonumber(currentrun) or 0
if validstring(arguments.arguments) then
context.setupenv { arguments.arguments }