From 3c8602ee9f04991e1d60b8d6504e12296ca671d9 Mon Sep 17 00:00:00 2001 From: Alejandro Sior Date: Wed, 15 Jun 2022 17:42:40 +0200 Subject: gptman: add files --- main.ha | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 main.ha (limited to 'main.ha') diff --git a/main.ha b/main.ha new file mode 100644 index 0000000..89e6686 --- /dev/null +++ b/main.ha @@ -0,0 +1,18 @@ +use fmt; +use getopt; +use os; + +use convert; +use mbr; +use gpt; + +export fn main() void = { + if (len(os::args) < 2) { + fmt::fatalf("{}: expected command", os::args[0]); + }; + + switch (os::args[1]) { + case "convert" => convert::convert(os::args[1..]); + case => fmt::fatalf("{}: no such command {}", os::args[0], os::args[1]); + }; +}; -- cgit v1.2.3