diff options
Diffstat (limited to 'src/main.c')
| -rw-r--r-- | src/main.c | 30 |
1 files changed, 26 insertions, 4 deletions
@@ -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 <https://www.gnu.org/licenses/>. + +*/ + #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); |
