aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cli/commands.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/cli/commands.c b/src/cli/commands.c
index d206865..85b05c2 100644
--- a/src/cli/commands.c
+++ b/src/cli/commands.c
@@ -13,12 +13,14 @@
static int install(int, char**);
static int update(int, char**);
static int run(int, char**);
+static int version(int, char**);
static int info(int, char**);
const struct Command commands[] = {
{ .name = "install", .func = install, .description = "Install OpenFortress"},
{ .name = "update", .func = update, .description = "Update an existing install"},
{ .name = "run", .func = run, .description = "Run OpenFortress"},
+ { .name = "version", .func = version, .description = "Display the OFCL version"},
{ .name = "info", .func = info, .description = "Show info about the current setup"},
};
const size_t commands_size = ARRAY_LEN(commands);
@@ -218,6 +220,12 @@ static int run(int c, char** v)
return exit_val;
}
+static int version(int c, char** v)
+{
+ puts(VERSION);
+ return EXIT_SUCCESS;
+}
+
static int info(int c, char** v)
{
char* of_dir = getOpenFortressDir();