Commit 2a65897f authored by MichelJuillard's avatar MichelJuillard
Browse files

fix command line options handling

parent ed8cb604
...@@ -4,14 +4,12 @@ function dynare_preprocess(modfilename, args) ...@@ -4,14 +4,12 @@ function dynare_preprocess(modfilename, args)
dynare_args = [basename(modfilename), "language=julia", "output=third", "json=compute"] dynare_args = [basename(modfilename), "language=julia", "output=third", "json=compute"]
offset = 0 offset = 0
for a in args for a in args
if occursin(r"^output=", a) astring = string(a)
deleteat!(dynare_args, 3) if (!occursin(r"^output=", astring)
offset = 1 && !occursin(r"^json=", astring))
elseif occursin(r"^json=", a) push!(dynare_args, astring)
deleteat!(dynare_args, 4 - offset)
end end
end end
append!(dynare_args, args)
println(dynare_args) println(dynare_args)
run_dynare(modfilename, dynare_args) run_dynare(modfilename, dynare_args)
end end
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment