From 119d56047e5bd49c42ca7378a332707c021a81cc Mon Sep 17 00:00:00 2001 From: forever2k38 Date: Mon, 7 Sep 2026 13:47:57 +0200 Subject: remove testing repo, begin testing with main repo --- src/repo.c | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/repo.c b/src/repo.c index 3dfa985..846136c 100644 --- a/src/repo.c +++ b/src/repo.c @@ -42,15 +42,38 @@ int pow_repo_get_package(pow_repo **repos, size_t repo_count, pow_package *pkg, dp = opendir(package_path); - free(package_path); - if (!dp) { + free(package_path); + continue; } printf("found package %s in repo %s\n", query, repos[i]->path); - pow_package_open(pkg, "./testing/sys-build/samurai/1.3.lua"); + char *full_path = malloc(PATH_MAX); + + if (!full_path) { + free(package_path); + + printf("failed to malloc full path for build script\n"); + + return 1; + } + + written = snprintf(full_path, PATH_MAX, "%s/%s", package_path, "build.lua"); + + if (written >= PATH_MAX) { + printf("something went seriously wrong. the path for the package build " + "script %s is " + "too long?\n", + query); + + free(package_path); + + return 1; + } + + pow_package_open(pkg, full_path); closedir(dp); } -- cgit v1.3