commit d1dc25addcf28f91817c425b1ee67a3b015d1216
parent 3151a494bf74cb3b015763f049444c702904c81d
Author: Drew DeVault <sir@cmpwn.com>
Date: Sun, 14 Mar 2021 09:59:23 -0400
driver: riggings for cache subcommand
Diffstat:
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/cmd/hare/main.ha b/cmd/hare/main.ha
@@ -4,7 +4,7 @@ use os;
export fn main() void = {
let help: []getopt::help = [
"compile, run, and test Hare programs",
- "<build | deps | run | test | version>", "args...",
+ "<build | cache | deps | run | test | version>", "args...",
];
let cmd = getopt::parse(os::args, help...);
defer getopt::finish(&cmd);
@@ -13,6 +13,7 @@ export fn main() void = {
os::exit(1);
};
if (cmd.args[0] == "build") build(cmd.args)
+ else if (cmd.args[0] == "cache") cache(cmd.args)
else if (cmd.args[0] == "deps") deps(cmd.args)
else if (cmd.args[0] == "run") run(cmd.args)
else if (cmd.args[0] == "test") test(cmd.args)
diff --git a/cmd/hare/subcmds.ha b/cmd/hare/subcmds.ha
@@ -102,6 +102,18 @@ fn build(args: []str) void = {
plan_execute(&plan, verbose);
};
+fn cache(args: []str) void = {
+ let help: []getopt::help = [
+ "manages the build cache",
+ ('c', "cleans the specified modules"),
+ "modules...",
+ ];
+ let cmd = getopt::parse(args, help...);
+ defer getopt::finish(&cmd);
+
+ abort(); // TODO
+};
+
fn deps(args: []str) void = {
let help: []getopt::help = [
"prints dependency information for Hare programs",