cc/update.lua

42 lines
1.2 KiB
Lua
Raw Normal View History

2024-06-01 01:19:54 +00:00
function update_update()
if fs.exists("update.lua.old") then
fs.delete("update.lua.old")
else
if fs.exists("update.lua") then
fs.move("update.lua", "update.lua.old")
end
shell.execute("wget", "https://gitea.rs485.network/ben/cc/raw/branch/main/update.lua", "update.lua")
2024-06-01 01:27:12 +00:00
if fs.exists("update.lua.old") then
if fs.getSize("update.lua.old") ~= fs.getSize("update.lua") then
shell.run("update")
-- re-ran update, don't continue in this instance
return false
else
fs.delete("update.lua.old")
end
2024-06-01 01:19:54 +00:00
end
end
return true
2024-05-31 23:31:52 +00:00
end
2024-06-01 01:19:54 +00:00
2024-06-01 02:39:41 +00:00
function download_file(filename)
if fs.exists(filename) then
fs.delete(filename)
end
shell.execute("wget", "https://gitea.rs485.network/ben/cc/raw/branch/main/" .. filename, filename)
end
2024-06-01 01:19:54 +00:00
if update_update() then
2024-06-01 02:39:41 +00:00
download_file("permset.lua")
download_file("winhlp.lua")
2024-06-01 14:20:00 +00:00
download_file("tabview.lua")
download_file("listview.lua")
download_file("listframes.lua")
2024-06-01 02:39:41 +00:00
download_file("requests.lua")
download_file("orders.lua")
download_file("test.lua")
2024-06-02 19:18:31 +00:00
download_file("inspect.lua")
2024-06-01 01:19:54 +00:00
shell.run("test")
2024-05-31 23:31:52 +00:00
end