aboutsummaryrefslogtreecommitdiff
path: root/src/build.cc
diff options
context:
space:
mode:
authordacctal <dacctal@symlinx.net>2026-05-02 08:38:13 +0000
committerdacctal <dacctal@symlinx.net>2026-05-02 08:38:13 +0000
commit44eb727dc537403be092326639a5b7c6d7182146 (patch)
tree1459603e69496400c22f53dcec67ec2c3348400a /src/build.cc
parentc555d4c25b5526c37e94ee2c593f34bdf28b159e (diff)
fixed like half of everything idk, you can install stuff now
Diffstat (limited to 'src/build.cc')
-rw-r--r--src/build.cc21
1 files changed, 4 insertions, 17 deletions
diff --git a/src/build.cc b/src/build.cc
index 88b40c7..a78faf9 100644
--- a/src/build.cc
+++ b/src/build.cc
@@ -5,24 +5,11 @@
#include "lua_build.hh"
#include "vars.hh"
-void build(std::filesystem::path build_dir) {
- if (build_dir != std::filesystem::current_path().string()) {
- std::filesystem::current_path(build_dir);
+void build(Pkg pkg) {
+ if (pkg.src != std::filesystem::current_path().string()) {
+ std::filesystem::current_path(pkg.src);
}
-
- bool bldit_found = false;
- bool build_found = false;
-
- for (auto const &dir_entry : std::filesystem::directory_iterator(std::filesystem::current_path().string())) {
- if (dir_entry.path().filename() == "bldit") {
- bldit_found = true;
- break;
- }
- }
-
- if (bldit_found) {
- system("./bldit");
- } else if (lua_build(build_dir.c_str())) {
+ if (lua_build(pkg.name.c_str(), pkg.target, pkg.src.c_str())) {
return;
} else {
std::cout << print_error << "no usable build system was found\n";