Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local files = {
- [1] = {
- "bios",
- "https://raw.githubusercontent.com/CoolMan119/TextUI/master/bios.lua"
- },
- [2] = {
- "startup",
- "https://raw.githubusercontent.com/CoolMan119/TextUI/master/startup"
- },
- [3] = {
- "/textui/apis/component",
- "https://raw.githubusercontent.com/CoolMan119/TextUI/master/textui/apis/component.lua"
- },
- [4] = {
- "/textui/apis/cpu",
- "https://raw.githubusercontent.com/CoolMan119/TextUI/master/textui/apis/cpu.lua"
- },
- [5] = {
- "/textui/apis/gpu",
- "https://raw.githubusercontent.com/CoolMan119/TextUI/master/textui/apis/gpu.lua"
- },
- [6] = {
- "/textui/programs/shell",
- "https://raw.githubusercontent.com/CoolMan119/TextUI/master/textui/programs/shell.lua"
- }
- }
- term.clear()
- term.setCursorPos(1,1)
- print("Welcome to TextUI!")
- print("A fast, easy, and secure OS")
- print()
- write("Install? (Y/N): ")
- result = read()
- if result == "y" or result == "Y" then
- term.clear()
- term.setCursorPos(1,1)
- print("Installing TextUI...")
- for k,v in pairs(files) do
- print(v[1])
- local req = http.get(v[2])
- file = fs.open(v[1], "w")
- file.write(req.readAll())
- file.close()
- end
- print("Sucessfully installed TextUI!")
- os.sleep(1)
- os.reboot()
- elseif result == "n" or result == "N" then
- os.queueEvent("terminate")
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement