Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local computer = require("computer")
- local fs = require("filesystem")
- local kb = require("keyboard")
- local shell = require("shell")
- local term = require("term")
- local io = require("io")
- local function greeting()
- term.clear()
- term.setCursor(1,1)
- print("Welcome to the OpenOS_Plus installer!")
- print("This installer will help guide you through setting up and installing OpenOS_Plus")
- print("Press any key to continue.")
- local event = event.pull("key_down")
- if event then
- term.clear()
- term.setCursor(1,1)
- downLoad()
- end
- end
- local function downLoad()
- term.write("Please wait while the files are downloaded and installed.")
- term.setCursor(1,2)
- shell.execute("wget -f https://raw.githubusercontent.com/Shuudoushi/OpenOS_Plus/master/autorun.lua")
- os.sleep(5)
- term.setCursor(1,4)
- shell.execute("wget -f https://raw.githubusercontent.com/Shuudoushi/OpenOS_Plus/master/lib/superauth.lua /lib/superauth.lua")
- os.sleep(5)
- term.setCursor(1,6)
- shell.execute("wget -f https://raw.githubusercontent.com/Shuudoushi/OpenOS_Plus/master/bin/logout.lua /bin/logout.lua")
- os.sleep(5)
- term.setCursor(1,8)
- shell.execute("wget -f https://raw.githubusercontent.com/Shuudoushi/OpenOS_Plus/master/bin/usage.lua /bin/usage.lua")
- os.sleep(5)
- term.setCursor(1,10)
- shell.execute("wget -f https://raw.githubusercontent.com/Shuudoushi/OpenOS_Plus/master/bin/.root.lua /bin/.root.lua")
- os.sleep(5)
- term.setCursor(1,12)
- shell.execute("wget -f https://raw.githubusercontent.com/Shuudoushi/OpenOS_Plus/master/bin/update.lua /bin/update.lua")
- os.sleep(5)
- term.setCursor(1,14)
- end
- local function userInfo()
- term.clear()
- term.setCursor(1,1)
- term.write("Please enter a username. Usernames must be lowercase.")
- term.setCursor(1,2)
- term.write("Username: ")
- username = term.read()
- username = string.gsub(username, "\n", "")
- term.setCursor(1,3)
- term.write("Password: ")
- password = term.read(nil, nil, nil, "")
- password = string.gsub(password, "\n", "")
- u = io.open("/userName.dat", "w")
- u:write(username)
- u:close()
- p = io.open("/passWord.dat", "w")
- p:write(password)
- p:close()
- u = io.open("/userName.dat", "r")
- testu = u:read()
- u:close()
- if not fs.exist("/usr/home/" .. testu .. "/")
- fs.makeDirectory("/usr/home/" .. testu .. "/")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement