Implement most of the spec reusing scribe & nefthera code

This commit is contained in:
Juno Takano 2025-04-09 01:59:32 -03:00
commit 612a98cfde
16 changed files with 225 additions and 25 deletions

View file

@ -0,0 +1,15 @@
let merge (schema: Schema.schema) (packages: string list) =
match packages with
| [] -> { schema with output = { message = "No packages provided" } }
| _ ->
let in_targets = List.flatten [["doas"; "apk"; "-i"; "add"]; packages] and
out_targets = List.flatten [["doas"; "apk"; "-i"; "del"]; packages] in
Process.Fork.run "doas" in_targets;
Process.Fork.run "doas" out_targets;
{ schema with output = {
message = "Done: " ^ (String.concat "\n" packages)
}}