OC-PsychOS2/.buildactions/10_zlua.lua

19 lines
410 B
Lua
Raw Permalink Normal View History

2020-06-03 10:09:37 +10:00
local function makezlua(file)
local path = file:match("^(.+)/.+%..+$")
os.execute("mkdir -p target/"..path)
os.execute("cat "..file.." | luamin -c | lua zlua.lua > target/"..file)
end
function actions.files()
local libs = find("lib", "*.lua")
local svcs = find("service", "*.lua")
for i=1, #libs do
makezlua(libs[i])
end
for i=1, #svcs do
makezlua(svcs[i])
end
end
actions[#actions+1] = "files"