From 599f685b8c58b9dd1e75018ec0f024814a902334 Mon Sep 17 00:00:00 2001 From: XeonSquared Date: Sat, 23 Sep 2017 09:52:31 +1000 Subject: [PATCH] wrote an updater script --- exec/update.lua | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 exec/update.lua diff --git a/exec/update.lua b/exec/update.lua new file mode 100644 index 0000000..1aaa916 --- /dev/null +++ b/exec/update.lua @@ -0,0 +1,20 @@ +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"}} + 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 +