From 3cb0e30260017b8b5c93efbaa9273c2aa666154d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20F=C3=A9votte?= Date: Wed, 15 Apr 2020 18:58:04 +0200 Subject: [PATCH] =?UTF-8?q?Ex=2003-3=20:=20ajustements=20pour=20la=20repro?= =?UTF-8?q?ductibilit=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- module3/exo3/Tools.jl | 25 +++++++++++++++++++++++++ module3/exo3/utils.jl | 25 ------------------------- 2 files changed, 25 insertions(+), 25 deletions(-) create mode 100644 module3/exo3/Tools.jl diff --git a/module3/exo3/Tools.jl b/module3/exo3/Tools.jl new file mode 100644 index 0000000..c507a3a --- /dev/null +++ b/module3/exo3/Tools.jl @@ -0,0 +1,25 @@ +cd(@__DIR__) + +module Tools + +function run_julia(args...) + cd(@__DIR__) + julia = Base.julia_cmd()[1] + run(`$julia --color=yes --startup-file=no --project $args`) + nothing +end + +setup() = run_julia("setup.jl") + +compile() = run_julia("compile.jl") + +function weave() + cd(@__DIR__) + + opts = String[] + isfile("Exercice.so") && push!(opts, "-JExercice.so") + + run_julia(opts..., "make.jl") +end + +end diff --git a/module3/exo3/utils.jl b/module3/exo3/utils.jl index b998954..5f22294 100644 --- a/module3/exo3/utils.jl +++ b/module3/exo3/utils.jl @@ -93,28 +93,3 @@ function disp() m.captures[1] end |> print end - - -module Exercice - -function run_julia(args...) - cd(@__DIR__) - julia = Base.julia_cmd()[1] - run(`$julia --color=yes --startup-file=no --project $args`) - nothing -end - -setup() = run_julia("setup.jl") - -compile() = run_julia("compile.jl") - -function weave() - cd(@__DIR__) - - opts = String[] - isfile("Exercice.so") && push!(opts, "-JExercice.so") - - run_julia(opts..., "make.jl") -end - -end -- 2.18.1