summaryrefslogtreecommitdiff
path: root/main.ha
diff options
context:
space:
mode:
Diffstat (limited to 'main.ha')
-rw-r--r--main.ha18
1 files changed, 18 insertions, 0 deletions
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]);
+ };
+};