This commit is contained in:
parent
0fc93545ce
commit
703ac28f52
16 changed files with 548 additions and 215 deletions
17
lib/commands/fresh.ml
Normal file
17
lib/commands/fresh.ml
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
let run () =
|
||||
print_string Common.header;
|
||||
Common.meat_print "HUNTING FRESH MEATS..";
|
||||
let argv_len = Array.length Sys.argv in
|
||||
let root = Sys.getenv "MEATS" in
|
||||
if argv_len >= 3 then
|
||||
let open Array in
|
||||
let flakes = sub Sys.argv 2 (argv_len - 2) in
|
||||
flakes
|
||||
|> iter (fun f ->
|
||||
if Common.all_low f = "meat" then Common.meat_print "PROCESSING REAL MEAT.."
|
||||
else Common.meat_print ("PROCESSING FRESH MEAT " ^ Common.all_caps f ^ "..");
|
||||
Common.do_cmd ~args:false @@ "nix flake update " ^ f ^ " --flake " ^ root
|
||||
|> ignore)
|
||||
else Common.do_cmd @@ "nix flake update --flake " ^ root |> ignore;
|
||||
print_string Common.footer;
|
||||
print_newline ()
|
||||
Loading…
Add table
Add a link
Reference in a new issue