let wget
~host ~(run_program : Machine.Make_fun.t)
url destination =
let open KEDSL in
let name = "wget-" ^ Filename.basename destination in
workflow_node
(single_file destination ~host) ~name
~make:(
run_program ~name
~requirements:(Machine.Make_fun.downloading [])
Program.(
exec ["mkdir"; "-p"; Filename.dirname destination]
&& shf "wget %s -O %s"
(Filename.quote url) (Filename.quote destination)))
~edges:[
on_failure_activate (Remove.path_on_host ~host destination);
]