fix sudo placement, always print footer
All checks were successful
Nix Build / nix build (push) Successful in 11s
All checks were successful
Nix Build / nix build (push) Successful in 11s
This commit is contained in:
parent
8ba7d1cbab
commit
51d501a68e
1 changed files with 8 additions and 5 deletions
13
lib/meat.ml
13
lib/meat.ml
|
@ -39,7 +39,10 @@ let do_build () =
|
|||
Unix.getenv "MEATS" ^ "#nixosConfigurations." ^ Unix.gethostname ()
|
||||
^ ".config.system.build.toplevel"
|
||||
in
|
||||
do_cmd @@ "sudo nix build --profile /nix/var/nix/profiles/system --out-link " ^ tmpdir ^ "/build " ^ build_target
|
||||
do_cmd @@ "nix build --out-link " ^ tmpdir ^ "/build " ^ build_target
|
||||
>>= fun () ->
|
||||
do_cmd @@ "sudo nix-env --set -p /nix/var/nix/profiles/system " ^ tmpdir
|
||||
^ "/build"
|
||||
>>= fun () ->
|
||||
do_cmd @@ "sudo " ^ tmpdir ^ "/build/bin/switch-to-configuration switch"
|
||||
>|= fun () -> Unix.unlink @@ tmpdir ^ "/build"
|
||||
|
@ -47,10 +50,10 @@ let do_build () =
|
|||
let yum () =
|
||||
print_string header;
|
||||
meat_print "CONSUMING DELICIOUS MEATS..";
|
||||
do_build () |> function
|
||||
| Error _ ->
|
||||
print_string "FAILED TO CONSUME MEATS.";
|
||||
| _ -> (); print_string footer
|
||||
( do_build () |> function
|
||||
| Error _ -> print_string "FAILED TO CONSUME MEATS."
|
||||
| _ -> () );
|
||||
print_string footer
|
||||
|
||||
let cook () =
|
||||
print_string header;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue