aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordacctal <donotcontactmevia@email.invalid>2026-10-11 09:46:59 +0000
committerdacctal <donotcontactmevia@email.invalid>2026-10-11 09:46:59 +0000
commitaa7300924c9aba24ee555910a800cbba19249660 (patch)
treef8006e9e766fcab3a287c7afcda95c09adc93c4a /src
parent1481cf6423a30e13314e229915d9f3af190eaf37 (diff)
finally it installs things :D
Diffstat (limited to 'src')
-rw-r--r--src/hooks.c1
-rw-r--r--src/recipes.c5
2 files changed, 1 insertions, 5 deletions
diff --git a/src/hooks.c b/src/hooks.c
index 83fac15..20923b7 100644
--- a/src/hooks.c
+++ b/src/hooks.c
@@ -100,7 +100,6 @@ str pkg_get_latest_version(package_t *pkg) {
}
bool pkg_hook_recipe(char *recipe, package_t *pkg) {
- printf("hello there\n");
lua_get_field_type("pkgs", table, &config.init_path, 1);
lua_get_field_type(pkg->name.data, table, &config.init_path, 2);
lua_get_field_type("recipe", table, &config.init_path, 3);
diff --git a/src/recipes.c b/src/recipes.c
index bb29c4e..246224e 100644
--- a/src/recipes.c
+++ b/src/recipes.c
@@ -64,7 +64,7 @@ static bool pkg_read_status(const char desired, package_t *pkg) {
return false;
}
str status = file_read(&pkgit_status);
- success = (str_find_char(&status, desired) == 0);
+ success = (str_find_char(&status, desired) != 0);
str_free(&pkgit_status);
str_free(&status);
return success;
@@ -122,11 +122,8 @@ bool pkg_install(package_t *pkg) {
if (is_pkg_installed(pkg) && !flags.force) return true;
try_pkg_fn(pkg_fetch_sources, pkg, "fetch", 'f');
if (!pkg_enter(pkg)) return false;
- //if (!pkg_setup(pkg)) printf("setup failed");
try_pkg_fn(pkg_hook_setup, pkg, "setup", 's');
- //if (!pkg_build(pkg)) printf("build failed");
try_pkg_fn(pkg_hook_build, pkg, "build", 'b');
- printf("test\n");
try_pkg_fn(pkg_hook_install, pkg, "install", 'i');
log_success("'%.*s' installed", str_fmt(&pkg->name));
return true;