This repository was archived by the owner on Jul 19, 2023. It is now read-only.
forked from S4mpsa/InfOS
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.lua
More file actions
36 lines (30 loc) · 1.18 KB
/
Copy pathsetup.lua
File metadata and controls
36 lines (30 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
-- wget https://raw.githubusercontent.com/gordominossi/InfOS/master/setup.lua -f
local shell = require("shell")
local tarMan = "https://raw.githubusercontent.com/mpmxyz/ocprograms/master/usr/man/tar.man"
local tarBin = "https://raw.githubusercontent.com/mpmxyz/ocprograms/master/home/bin/tar.lua"
shell.setWorkingDirectory("/usr/man")
shell.execute("wget -fq " .. tarMan)
shell.setWorkingDirectory("/bin")
shell.execute("wget -fq " .. tarBin)
local InfOS = "https://github.com/gordominossi/InfOS/releases/latest/download/InfOS.tar"
local successfull =
pcall(
function()
shell.execute("rm -rf /home/InfOS")
shell.execute("mkdir /home/InfOS")
shell.setWorkingDirectory("/home/InfOS")
print("Downloading InfOS")
shell.execute("wget -fq " .. InfOS .. " -f")
print("Extracting")
shell.execute("tar -xf InfOS.tar")
shell.execute("rm -f InfOS.tar")
shell.execute("rm -rf /home/lib")
shell.execute("cp -r lib /home/lib")
shell.execute("cp -f .shrc /home/.shrc")
shell.execute("cp -f setup.lua /home/setup.lua")
print("Success!\n")
end
)
if (not successfull) then
print("Update failed")
end