mirror of
https://github.com/Adorable-Catgirl/Zorya-NEO.git
synced 2024-11-14 14:38:04 +11:00
19 lines
488 B
Lua
19 lines
488 B
Lua
local fs = require("filesystem")
|
|
print("Regenerating Zorya NEO configuration...")
|
|
fs.copy("/.zy2/cfg.lua", "/.zy2/cfg.lua.old")
|
|
local f = io.open("/.zy2/cfg.lua", "wb")
|
|
local lst = {}
|
|
for ent in fs.list("/etc/zorya-neo/config.d") do
|
|
if ent:sub(#ent) ~= "/" then
|
|
lst[#lst+1] = ent
|
|
end
|
|
end
|
|
table.sort(lst)
|
|
for i=1, #lst do
|
|
print("> "..lst[i])
|
|
assert(loadfile("/etc/zorya-neo/config.d/"..lst[i]))(function(code)
|
|
f:write(code)
|
|
end)
|
|
end
|
|
f:close()
|
|
print("Generated new configuration.") |