Skip to content

Commit 1ddc738

Browse files
committed
Simplify install examples
1 parent f94c279 commit 1ddc738

1 file changed

Lines changed: 7 additions & 14 deletions

File tree

src/VortexStepMethod.jl

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -227,21 +227,14 @@ end
227227

228228
function install_examples(add_packages=true)
229229
copy_examples()
230+
pkg_root = joinpath(dirname(pathof(@__MODULE__)), "..")
231+
src = joinpath(pkg_root, "data")
232+
isdir(src) && cp(src, "data"; force=true)
230233
if add_packages
231-
if ! ("ControlPlots" keys(Pkg.project().dependencies))
232-
Pkg.add("ControlPlots")
233-
end
234-
if ! ("LaTeXStrings" keys(Pkg.project().dependencies))
235-
Pkg.add("LaTeXStrings")
236-
end
237-
if ! ("Xfoil" keys(Pkg.project().dependencies))
238-
Pkg.add("Xfoil")
239-
end
240-
if ! ("CSV" keys(Pkg.project().dependencies))
241-
Pkg.add("CSV")
242-
end
243-
if ! ("DataFrames" keys(Pkg.project().dependencies))
244-
Pkg.add("DataFrames")
234+
for pkg in ("GLMakie", "LaTeXStrings", "Xfoil", "CSV", "DataFrames")
235+
if !(pkg keys(Pkg.project().dependencies))
236+
Pkg.add(pkg)
237+
end
245238
end
246239
end
247240
end

0 commit comments

Comments
 (0)