From f113371523bc26e320e5ef8799e6ab123af9618e Mon Sep 17 00:00:00 2001 From: forever2k38 Date: Wed, 30 Sep 2026 22:01:45 +0200 Subject: initial install support, better readme, relicense, and more! --- src/main.c | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index 4301657..299b70d 100644 --- a/src/main.c +++ b/src/main.c @@ -1,7 +1,29 @@ +/* + + pow! - the pow!erful package manager + + Copyright (C) 2026 forever2k38 + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +*/ + #include "args.h" #include "build.h" #include "config.h" #include "repo.h" +#include "log.h" #include "curl/curl.h" #include "stdio.h" @@ -27,15 +49,15 @@ int main(int argc, char *argv[]) { pow_open_config(&config, args.cfg_path); if (args.flags & POW_FLAG_QUERY) { - pow_repo_check_package(config.repos, config.repos_count, args.package); + pow_repo_check_package(&config, 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, + if (pow_repo_get_package(&config, pkg, args.package)) { - printf("error getting package\n"); + pow_log_error("failed to get package"); return 1; } @@ -46,7 +68,7 @@ int main(int argc, char *argv[]) { } if (args.flags == 0) { - printf("no command specified\n"); + pow_log_error("no command specified"); } pow_close_config(&config); -- cgit v1.3