Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --ReactorOS made by SuperRavenSn1per
- repo = "https://raw.githubusercontent.com/SuperRavenSn1per/ReactorOS/"
- branch = "main"
- directories = {"apis"}
- files = {"startup.lua", "apis/xText.lua", "interface.lua"}
- function install(file, fileName)
- if fs.exists(fileName) then
- fs.delete(fileName)
- end
- dat = http.get(repo..branch.."/"..file).readAll()
- f = fs.open(fileName, "w")
- f.write(dat)
- f.close()
- end
- function installAll()
- for i,dir in pairs(directories) do
- fs.makeDir(dir)
- end
- for i,file in pairs(files) do
- term.clear()
- term.setCursorPos(1,1)
- print("Installing..."..file)
- install(file, file)
- end
- os.reboot()
- end
- term.clear()
- term.setCursorPos(1,1)
- term.setTextColor(colors.yellow)
- print("ReactorOS Installer")
- term.setTextColor(colors.white)
- print("Are you sure you want to install ReactorOS? Loss of current files is possible. (Y/n)")
- while true do
- input = string.lower(read())
- if input == "y" then
- installAll()
- elseif input == "n" then
- print("Install aborted!")
- break
- else
- print("Please input 'Y or N'")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement