1
0
mirror of https://github.com/Adorable-Catgirl/Zorya-NEO.git synced 2024-11-13 14:08:07 +11:00
Zorya-NEO/.buildactions/12_libraries.lua
2020-06-05 19:45:08 -05:00

27 lines
504 B
Lua

function make_library(mod)
os.execute("mkdir -p pkg/lib")
print("LIB", mod)
local h = io.open("pkg/lib/"..mod..".velx", "w")
h:write(velx("init.lua", false, {
PWD = os.getenv("PWD").."/lib/"..mod
}))
h:close()
end
local libs = {}
local h = io.popen("ls lib", "r")
for line in h:lines() do
actions["lib_"..line] = function()
make_library(line)
end
libs[#libs+1] = "lib_"..line
end
function actions.alllibs()
for i=1, #libs do
actions[libs[i]]()
end
end
actions[#actions+1] = "alllibs"