aboutsummaryrefslogtreecommitdiffstats
path: root/src/cmd-version.c
diff options
context:
space:
mode:
authorLibravatar bigfoot547 <[email protected]>2024-01-08 12:17:20 -0600
committerLibravatar bigfoot547 <[email protected]>2024-01-08 12:17:20 -0600
commitd38c13b2fe1293b499312bb4cfd66a56108c4b5e (patch)
tree998438c400a6b05f13d145270e95a9236ed7fb87 /src/cmd-version.c
parentadd to-do list (diff)
WIP: JRE stuff
Diffstat (limited to 'src/cmd-version.c')
-rw-r--r--src/cmd-version.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/cmd-version.c b/src/cmd-version.c
index fbf87b1..fc9b7a8 100644
--- a/src/cmd-version.c
+++ b/src/cmd-version.c
@@ -1,6 +1,7 @@
#include "command.h"
#include "commands.h"
#include "digest/digest.h"
+#include "runtime.h"
#include "version.h"
#include "l2su.h"
#include "macros.h"
@@ -36,6 +37,20 @@ unsigned cmd_version_list_remote(struct l2_context_node *ctx, char **args)
unsigned cmd_version_list_local(struct l2_context_node *ctx, char **args)
{
+ json_t *manifest;
+ if (l2_runtime_load_manifest(&manifest) < 0) {
+ CMD_FATAL0("Failed to load manifest");
+ }
+
+ json_dumpf(manifest, stdout, JSON_INDENT(4));
+ putchar('\n');
+
+ if (l2_runtime_install_component(manifest, "jre-legacy") < 0) {
+ CMD_FATAL0("Failed to install component");
+ }
+
+ json_decref(manifest);
+
return CMD_RESULT_SUCCESS;
}