Simplifying setup

This commit is contained in:
Gabriel Moreira Minossi 2021-01-14 15:49:19 -03:00
parent d995a8f670
commit c3a0326631
5 changed files with 39 additions and 0 deletions

4
.shrc Normal file
View File

@ -0,0 +1,4 @@
cd /home/InfOS/Programs/monitor-system
clear
init
cd

35
setup.lua Normal file
View File

@ -0,0 +1,35 @@
-- 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/download/v0.1/InfOS.tar"
shell.setWorkingDirectory("/home")
if not shell.resolve("/home/lib") then
shell.execute("mkdir lib")
end
if not shell.resolve("/home/InfOS") then
shell.execute("mkdir InfOS")
end
shell.setWorkingDirectory("/home/InfOS")
print("\nUpdating InfOS")
shell.execute("wget -fq " .. InfOS .. " -f")
print("...")
shell.execute("tar -xf InfOS.tar")
shell.execute("rm -f InfOS.tar")
shell.setWorkingDirectory("/home/")
shell.execute("rm -f .shrc")
shell.execute("cp InfOS/.shrc .shrc")
shell.execute("rm -f setup.lua")
shell.execute("cp InfOS/setup.lua setup.lua")
print("Success!\n")