aboutsummaryrefslogtreecommitdiff
path: root/src/read_config.cc
diff options
context:
space:
mode:
authordacctal <dacctalyt@gmail.com>2026-04-17 08:16:21 +0000
committerdacctal <dacctalyt@gmail.com>2026-04-17 08:16:21 +0000
commitc421fe8fb87e949bae1860f0d501cf8e89ce0f18 (patch)
tree7b2ec26ec674bf864feb80a38aa9b33c7401e479 /src/read_config.cc
parent574708a5f97907c4b4e67788d38f89fac0981b70 (diff)
started manifest template
Diffstat (limited to 'src/read_config.cc')
-rw-r--r--src/read_config.cc40
1 files changed, 0 insertions, 40 deletions
diff --git a/src/read_config.cc b/src/read_config.cc
deleted file mode 100644
index 560b978..0000000
--- a/src/read_config.cc
+++ /dev/null
@@ -1,40 +0,0 @@
-extern "C" {
-#include <luajit-2.1/lua.h>
-#include <luajit-2.1/lauxlib.h>
-#include <luajit-2.1/lualib.h>
-}
-
-#include <vars.hh>
-
-void set_install_directories() {
- lua_State *L = lua_open();
- luaL_openlibs(L);
-
- if (luaL_loadfile(L, config_file.c_str()) || lua_pcall(L, 0, 0, 0)){
- std::cout << print_error << "cannot run configuration script: " << lua_tostring(L, -1) << "\n";
- return;
- }
-
- lua_getglobal(L, "install_directories");
-
- if (!lua_istable(L, -1)) {
- std::cout << print_error << "lua variable 'install_directories' is not a table.\n";
- }
-
- lua_pushnil(L);
-
- while (lua_next(L, -2) != 0) {
- const char *key = lua_tostring(L, -2);
- const char *value = lua_tostring(L, -1);
-
- install_dirs[key] = value;
-
- lua_pop(L, 1);
- }
-
- bin = install_dirs["bin"];
- lib = install_dirs["lib"];
- include = install_dirs["include"];
- pkgblds = install_dirs["pkgblds"];
-
-}