mirror of
https://github.com/Adorable-Catgirl/Zorya-NEO.git
synced 2024-11-14 14:38:04 +11:00
27 lines
504 B
Lua
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"
|