Improve lua build process + folder structure

This commit is contained in:
2022-09-26 22:16:31 +02:00
parent cf0be21596
commit 52b4c9000f
12 changed files with 38 additions and 23 deletions

View File

@@ -1,6 +1,6 @@
local args = { ... }
local token = args[1]
local existing = fs.exists("auth.lua")
if not token and not existing then
error("A token is required.")
@@ -16,8 +16,8 @@ elseif token then
error("Token failed!")
end
end
local files = { "main.lua", "json.lua", "framebuffer.lua", "ringbuffer.lua", "socket.lua" }
local files = { {% for filename in file_list %} "{{ filename }}", {% endfor %} }
for _, file in ipairs(files) do
fs.delete(file)
shell.run(("wget %s/lua/%s"):format(path, file))
shell.run(("wget %s/lua/%s %s"):format(path, file, file))
end