From ed979ea2b7cc0caf3abb47dce94e02ef16c73e65 Mon Sep 17 00:00:00 2001 From: forever2k38 Date: Wed, 2 Sep 2026 15:30:34 +0200 Subject: lua work --- src/main.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index 73617ef..9c38b18 100644 --- a/src/main.c +++ b/src/main.c @@ -1,8 +1,10 @@ #include "args.h" +#include "build.h" #include "config.h" #include "repo.h" #include "stdio.h" +#include "stdlib.h" int main(int argc, char *argv[]) { pow_args args = {0}; @@ -20,7 +22,20 @@ int main(int argc, char *argv[]) { pow_open_config(&config, args.cfg_path); if (args.flags & POW_FLAG_QUERY) { - repo_check_package(config.repos, config.repos_count, "samurai"); + pow_repo_check_package(config.repos, config.repos_count, args.package); + } + + if (args.flags & POW_FLAG_SYNC) { + pow_package *pkg = malloc(sizeof(pow_package)); + + if (!pow_repo_get_package(config.repos, config.repos_count, pkg, + args.package)) { + printf("error getting package\n"); + } + + pow_package_build(pkg); + + pow_package_close(pkg); } if (args.flags == 0) { -- cgit v1.3