gluon/scripts/site_config.lua

10 lines
303 B
Lua
Raw Normal View History

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