diff options
| author | dacctal <donotcontactmevia@email.invalid> | 2026-07-04 05:27:09 +0000 |
|---|---|---|
| committer | dacctal <donotcontactmevia@email.invalid> | 2026-07-04 05:27:09 +0000 |
| commit | 6a386ee203c609894dc6e6e97bf6d5c651ab3e37 (patch) | |
| tree | 72bdfc2a50c71d862ceea449a9f6260cfd7dc4ff /src/lua_vars.c | |
| parent | 0b53842c93697913704303ed1967150705359f35 (diff) | |
lua checkpoint!
Diffstat (limited to 'src/lua_vars.c')
| -rw-r--r-- | src/lua_vars.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/lua_vars.c b/src/lua_vars.c index 3fd2ddb..ddb4c5a 100644 --- a/src/lua_vars.c +++ b/src/lua_vars.c @@ -18,10 +18,9 @@ */ -#include "lua_vars.h" +#include "pkgit_lua.h" #include "globs.h" -#include "lua_globs.h" void init_install_directories(void) { init_lua_state(); @@ -55,3 +54,15 @@ void init_install_directories(void) { lua_pop(L, 1); } + +void init_prefix_directory(void) { + lua_getglobal(L, "prefix"); + if (!lua_isstring(L, -1)) { +// printf(PRINT_ERROR "init.lua: 'prefix' is not a string.\n"); + lua_isnt_type("prefix", "string."); + return; + } + inst_dirs.prefix = mstr(lua_tostring(L, -1)); +// snprintf(prefix_dir, MAX_PATH_LEN, "%s", lua_tostring(L, -1)); + lua_pop(L, 1); +} |
