simplify yum command
This commit is contained in:
parent
a1a0b134ad
commit
c8978534dc
1 changed files with 3 additions and 10 deletions
13
lib/meat.ml
13
lib/meat.ml
|
@ -39,15 +39,9 @@ let do_build () =
|
|||
Unix.getenv "MEATS" ^ "#nixosConfigurations." ^ Unix.gethostname ()
|
||||
^ ".config.system.build.toplevel"
|
||||
in
|
||||
do_cmd @@ "nix build --out-link " ^ tmpdir ^ "/build " ^ build_target
|
||||
do_cmd @@ "sudo nix build --profile /nix/var/nix/profiles/system --out-link " ^ tmpdir ^ "/build " ^ build_target
|
||||
>>= fun () ->
|
||||
do_cmd @@ "sudo " ^ tmpdir ^ "/build/bin/switch-to-configuration switch"
|
||||
>>= fun () ->
|
||||
do_cmd @@ "sudo " ^ tmpdir ^ "/build/bin/switch-to-configuration boot"
|
||||
>>= fun () ->
|
||||
let realpath = Unix.readlink @@ tmpdir ^ "/build" in
|
||||
do_cmd @@ "sudo nix-env --profile /nix/var/nix/profiles/system --set "
|
||||
^ realpath
|
||||
>|= fun () -> Unix.unlink @@ tmpdir ^ "/build"
|
||||
|
||||
let yum () =
|
||||
|
@ -55,9 +49,8 @@ let yum () =
|
|||
meat_print "CONSUMING DELICIOUS MEATS..";
|
||||
do_build () |> function
|
||||
| Error _ ->
|
||||
print_string "FAILED TO CONSUME MEATS";
|
||||
print_string footer
|
||||
| _ -> print_string footer
|
||||
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