Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.pullEvent = os.pullEventRaw
- function downloadItem(pastebin, path, fileName)
- tPath = "/"..path.."/"..fileName
- shell.run("pastebin", "get", pastebin, tPath)
- return true
- end
- function runItem(pastebin)
- shell.run("pastebin", "run", pastebin)
- return true
- end
- function ejectAll()
- if disk.isPresent("top") then
- disk.eject("top")
- elseif disk.isPresent("bottom") then
- disk.eject("bottom")
- elseif disk.isPresent("right") then
- disk.eject("right")
- elseif disk.isPresent("left") then
- disk.eject("left")
- elseif disk.isPresent("front") then
- disk.eject("front")
- elseif disk.isPresent("back") then
- disk.eject("back")
- else
- return false
- end
- return true
- end
- term.clear()
- term.setCursorPos(1,1)
- print("Welcome to Diamond OS installer.")
- print("Type \"install\" to install, and type \"cancel\" to cancel.")
- while true do
- write("> ")
- input = read()
- if input == "install" then
- break
- elseif input == "cancel" then
- ejectAll()
- os.reboot()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment