aboutsummaryrefslogtreecommitdiff
path: root/src/install_pkg.c
diff options
context:
space:
mode:
authordacctal <dacctal@symlinx.net>2026-06-03 15:01:21 +0000
committerdacctal <dacctal@symlinx.net>2026-06-03 15:01:21 +0000
commit198cde49db902ee97775c74c5cfd971b07cb0c78 (patch)
tree95fbdf28cb9a0a02f18bd944ccfd7e3567545876 /src/install_pkg.c
parent62480d6cc957c9ad36dc2ca6fc5802d79b6e8590 (diff)
install and remove commands are much more customizable :)
Diffstat (limited to 'src/install_pkg.c')
-rw-r--r--src/install_pkg.c26
1 files changed, 18 insertions, 8 deletions
diff --git a/src/install_pkg.c b/src/install_pkg.c
index 2f4f88f..4e3b3c6 100644
--- a/src/install_pkg.c
+++ b/src/install_pkg.c
@@ -7,8 +7,8 @@
#include "add_repo.h"
#include "fetch_src.h"
#include "build.h"
-#include "copy_install.h"
-#include "link_install.h"
+//#include "copy_install.h"
+//#include "link_install.h"
#include "lua_state.h"
#include "name_from_url.h"
#include "vars.h"
@@ -25,13 +25,23 @@ void install_pkg(Pkg pkg) {
if (is_verbose) printf("%sbuilt %s%s%s\n", print_pkgit, green, pkg.name, color_reset);
printf("%sinstalling %s%s%s\n", print_pkgit, green, pkg.name, color_reset);
- if (is_auto_installed) {
- if (is_symlink_install) {
- link_install(pkg.src);
- } else {
- copy_install(pkg.src);
- }
+ bool install_success = false;
+ if (!install_success && repo_install(pkg.url)) install_success = true;
+ if (!install_success && bldit_install(pkg.target)) install_success = true;
+ if (!install_success && config_install(pkg.src)) install_success = true;
+ if (!install_success) {
+ printf("%sno install function availible for package: %s\n",
+ print_error, pkg.name);
+ return;
}
+ //is_auto_installed = true;
+ //if (is_auto_installed) {
+ // if (is_symlink_install) {
+ // link_install(pkg.src);
+ // } else {
+ // copy_install(pkg.src);
+ // }
+ //}
printf("%sinstalled %s%s%s\n", print_success, green, pkg.name, color_reset);
bool repo_exists = false;