P27ILID2JNRMIXJNW47AWFYDU37BXQETA63W742HWVWGAXEET4QQC
let run_shell (spec : Elpe.std_derivation) cmd =
Lwt_main.run
(let open Lwt.Syntax in
let port = 50051 in
let address = "127.0.0.1" in
let* c = connection address port in
Elpe.backend_conn := Some c;
let* b = spec#setup in
let run_shell (spec : Elpe.derivation) cmd =
let* b = spec#setup in
let pid =
Unix.create_process
(bash ^ "/usr/bin/bash-static")
(match cmd with
| None -> [| "bash"; "--init-file"; f; "-i" |]
| Some cmd -> [| "bash"; "--init-file"; f; "-i"; "-c"; cmd |])
Unix.stdin Unix.stdout Unix.stderr
in
let pid =
Unix.create_process
(bash ^ "/usr/bin/bash-static")
(match cmd with
| None -> [| "bash"; "--init-file"; f; "-i" |]
| Some cmd -> [| "bash"; "--init-file"; f; "-i"; "-c"; cmd |])
Unix.stdin Unix.stdout Unix.stderr
in
Lwt_main.run
(let open Lwt.Syntax in
let port = 50051 in
let address = "127.0.0.1" in
let* c = connection address port in
Elpe.backend_conn := Some c;
let* b = spec#build in
print_endline (List.fold_left (fun _ x -> x) "" b.destdir);
Lwt.return ())
let* b = spec#build in
print_endline (List.fold_left (fun _ x -> x) "" b.destdir);
Lwt.return ()
compile files;
match !Elpe.last_built_module with
| None -> Unix._exit 0
| Some last -> Unix._exit (run_shell last cmd))
Lwt_main.run
(let* _ = compile (if files = [] then [ "build.ml" ] else files) in
match !Elpe.last_built_module with
| None -> Unix._exit 0
| Some last ->
let* last = last in
let* shell = run_shell last cmd in
Unix._exit shell))
compile (if files = [] then [ "build.ml" ] else files);
let _ =
match !Elpe.last_built_module with
| None -> ()
| Some last -> run_build (last :> Elpe.derivation)
in
())
Lwt_main.run
(let* _ = compile (if files = [] then [ "build.ml" ] else files) in
match !Elpe.last_built_module with
| None -> Lwt.return ()
| Some last ->
let* last = last in
run_build (last :> Elpe.derivation)))