From 6a386ee203c609894dc6e6e97bf6d5c651ab3e37 Mon Sep 17 00:00:00 2001 From: dacctal Date: Sat, 4 Jul 2026 05:27:09 +0000 Subject: lua checkpoint! --- src/lua_vars.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'src/lua_vars.c') 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); +} -- cgit v1.2.3