From aa0d78815004ae6b0c4a42b0e024f5c4ef555ae2 Mon Sep 17 00:00:00 2001 From: dacctal Date: Sun, 24 May 2026 10:23:38 +0000 Subject: c rewrite --- src/install_pkg.cc | 43 ------------------------------------------- 1 file changed, 43 deletions(-) delete mode 100644 src/install_pkg.cc (limited to 'src/install_pkg.cc') diff --git a/src/install_pkg.cc b/src/install_pkg.cc deleted file mode 100644 index 208c397..0000000 --- a/src/install_pkg.cc +++ /dev/null @@ -1,43 +0,0 @@ -#include - -#include "add_repo.hh" -#include "fetch_src.hh" -#include "build.hh" -#include "copy_install.hh" -#include "install_pkg.hh" -#include "link_install.hh" -#include "lua_state.hh" -#include "name_from_url.hh" -#include "vars.hh" - -void install_pkg(Pkg pkg) { - if (!pkg.is_local) { - std::cout << print_pkgit << "fetching source..." << std::endl; - fetch_src(pkg); - std::cout << print_pkgit << "source fetched!" << std::endl; - } - - std::cout << print_pkgit << "building..." << std::endl; - build(pkg); - std::cout << print_pkgit << "build complete!" << std::endl; - - std::cout << print_pkgit << "installing..." << std::endl; - if (is_symlink_install) { link_install(pkg.src); } - else { copy_install(pkg.src); } - std::cout << print_pkgit << "installed!" << std::endl; - - bool repo_exists = false; - for (auto repo : cached_repos) { - if (name_from_url(repo.second.source.value) == pkg.name) { - repo_exists = true; - } - } - - if (!repo_exists) { - std::cout << print_pkgit << "adding repository..." << std::endl; - add_repo(pkg.url, pkg.name); - std::cout << print_pkgit << "done!" << std::endl; - } else { - std::cout << print_pkgit << "repo already exists, done!" << std::endl; - } -} -- cgit v1.2.3