From 12d53b3661231650c7563be9ddd2cd3cbfafeec1 Mon Sep 17 00:00:00 2001 From: bigfoot547 Date: Mon, 1 Jan 2024 03:44:59 -0600 Subject: now loads libraries --- src/cmd-version.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'src/cmd-version.c') diff --git a/src/cmd-version.c b/src/cmd-version.c index 3896fcd..b1e3fa8 100644 --- a/src/cmd-version.c +++ b/src/cmd-version.c @@ -31,10 +31,17 @@ unsigned cmd_version_list_remote(struct l2_context_node *ctx, char **args) unsigned cmd_version_list_local(struct l2_context_node *ctx, char **args) { - return CMD_RESULT_SUCCESS; } +unsigned l2_version_download_libraries(json_t *jlibraries, l2_version_feature_match_proc_t *feature_matcher); + +bool feat_match_cb(const char *name, json_t *js) { + L2_UNUSED(name); + L2_UNUSED(js); + return false; +} + unsigned cmd_version_install(struct l2_context_node *ctx, char **args) { unsigned res = l2_version_load_remote(); @@ -43,12 +50,17 @@ unsigned cmd_version_install(struct l2_context_node *ctx, char **args) } json_t *js; - res = l2_version_load_local("b1.7.3", &js); + res = l2_version_load_local(*args, &js); if (res != VERSION_SUCCESS) { CMD_FATAL("failed to load 1.8.9: %s", l2_version_strerror(res)); } json_dumpf(js, stdout, JSON_INDENT(4)); + + putchar('\n'); + + printf("%s\n", l2_version_strerror(l2_version_download_libraries(json_object_get(js, "libraries"), &feat_match_cb))); + json_decref(js); return CMD_RESULT_SUCCESS; -- cgit v1.2.3-70-g09d2