OC-PsychOS/exec/update.lua

21 lines
919 B
Lua

local tA = {...}
local wget = wget or loadfile("/boot/exec/wget.lua")
if not wget then
print("wget is required to run this program")
else
local repo = tA[1] or "https://lain.shadowkat.net/~izaya/ocdoc/PsychOS-build/fsdev/PsychOS-fsdev-latest/"
local fl = repo .. "files.txt"
local pref = tA[1] or "/boot/"
local files = {{"everything"},{"minimal"},{"headless"},{"severything"},{"sminimal"},{"sheadless"},{"exec/addperm"},{"exec/cat"},{"exec/free"},{"exec/ls"},{"exec/luash"},{"exec/nbsrv"},{"exec/nshd"},{"exec/nsh"},{"exec/passwd"},{"exec/ps"},{"exec/rmperm"},{"exec/skex2"},{"exec/su"},{"exec/wget"},{"exec/update.lua"},{"exec/pkg.lua"}}
local count = 1
local total = #files
print(total)
for k,v in ipairs(files) do
print(tostring(count).."/"..tostring(total)..": "..pref..v[1]..".lua")
print(repo..v[1]..".lua",pref..v[1]..".lua")
wget(repo..v[1]..".lua",pref..v[1]..".lua")
count=count+1
end
end