aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/files.c2
-rw-r--r--src/hooks.c1
-rw-r--r--src/recipes.c12
3 files changed, 7 insertions, 8 deletions
diff --git a/src/files.c b/src/files.c
index 67a327a..70c45ea 100644
--- a/src/files.c
+++ b/src/files.c
@@ -17,7 +17,7 @@
*/
-#define _XOPEN_SOURCE 500
+//#define _XOPEN_SOURCE 500
#include <stdio.h>
#include <ftw.h>
#include <unistd.h>
diff --git a/src/hooks.c b/src/hooks.c
index 20923b7..83fac15 100644
--- a/src/hooks.c
+++ b/src/hooks.c
@@ -100,6 +100,7 @@ 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 b722cf8..bb29c4e 100644
--- a/src/recipes.c
+++ b/src/recipes.c
@@ -83,13 +83,11 @@ static bool is_pkg_installed(package_t *pkg) {
}
static bool pkg_fetch_sources(package_t *pkg) {
- //bool success = false;
if (!pkg_hook_fetch_sources(pkg)) {
log_error(GREEN "%.*s" COLOR_RESET " fetch failed",
str_fmt(&pkg->name));
return false;
}
- //success = pkg_write_status("f", pkg);
return true;
}
@@ -123,11 +121,11 @@ bool pkg_build(package_t *pkg) {
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');
+ 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));