diff options
Diffstat (limited to 'src/main.c')
| -rw-r--r-- | src/main.c | 17 |
1 files changed, 16 insertions, 1 deletions
@@ -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) { |
