diff options
Diffstat (limited to 'src/build.cc')
| -rw-r--r-- | src/build.cc | 21 |
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"; |
