gluon/scripts/load_site.lua
2014-05-15 22:59:12 +02:00

8 lines
282 B
Lua

local function loader()
coroutine.yield('return ')
coroutine.yield(io.open(os.getenv('GLUONDIR') .. '/site/site.conf'):read('*a'))
end
-- setfenv doesn't work with Lua 5.2 anymore, but we're using 5.1
config = setfenv(assert(load(coroutine.wrap(loader), 'site.conf')), {})()