Commit 898e12a3 authored by MichelJuillard's avatar MichelJuillard
Browse files

do cd only when needed

parent 23de699f
......@@ -13,9 +13,17 @@ function dynare_preprocess(modfilename, args)
end
append!(dynare_args, args)
println(dynare_args)
current_directory = pwd()
run_dynare(modfilename, dynare_args)
end
function run_dynare(modfilename, dynare_args)
directory = dirname(modfilename)
cd(directory)
if length(directory) > 0
current_directory = pwd()
cd(directory)
end
run(`$DYNARE_BINARY $dynare_args`)
cd(current_directory)
end
if length(directory) > 0
cd(current_directory)
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