only add path to LOAD_PATH if it is not already there
parent
96869fbd76
commit
a917d5e998
|
@ -21,8 +21,10 @@ module Dynare
|
||||||
export dynare, @dynare
|
export dynare, @dynare
|
||||||
|
|
||||||
function dynare(modfile)
|
function dynare(modfile)
|
||||||
# Add cd to path
|
# Add cd to path if not already there
|
||||||
unshift!(LOAD_PATH, pwd())
|
if isempty(findin([pwd()], LOAD_PATH))
|
||||||
|
unshift!(LOAD_PATH, pwd())
|
||||||
|
end
|
||||||
|
|
||||||
# Process modfile
|
# Process modfile
|
||||||
println(string("Using ", WORD_SIZE, "-bit preprocessor"))
|
println(string("Using ", WORD_SIZE, "-bit preprocessor"))
|
||||||
|
|
|
@ -2,7 +2,9 @@
|
||||||
workspace()
|
workspace()
|
||||||
|
|
||||||
# Modification of the path (for packages). Should be done in ~/.juliarc.jl with a fixed path instead.
|
# Modification of the path (for packages). Should be done in ~/.juliarc.jl with a fixed path instead.
|
||||||
unshift!(LOAD_PATH, abspath("../../../julia"))
|
if isempty(findin([abspath("../../../julia")], LOAD_PATH))
|
||||||
|
unshift!(LOAD_PATH, abspath("../../../julia"))
|
||||||
|
end
|
||||||
|
|
||||||
# Load Dynare package
|
# Load Dynare package
|
||||||
importall Dynare
|
importall Dynare
|
||||||
|
|
Loading…
Reference in New Issue