diff options
Diffstat (limited to 'src/build.cc')
| -rw-r--r-- | src/build.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/build.cc b/src/build.cc new file mode 100644 index 0000000..0195412 --- /dev/null +++ b/src/build.cc @@ -0,0 +1,13 @@ +#include <filesystem> + +#include "lua_build.cc" + +void build(std::filesystem::path build_dir) { + if (build_dir != std::filesystem::current_path().string()) { + std::filesystem::current_path(build_dir); + } + for (auto const &dir_entry : std::filesystem::directory_iterator(fs::current_path().string())) { + if (dir_entry.path().filename() == "bldit") { system("./bldit"); } + else { lua_build(build_dir.c_str()); } + } +} |
