Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Quartz OS Installer/Updater
- print("\nWould you like to update this program to allow for new files from the most recent update?\n\nChoose no if this has been updated just a moment ago.\n\nChoose yes if this is a new install. [Y/N]")
- while true do
- evt, key, held = os.pullEvent("key")
- if key == 21 then
- fs.delete("/system/updater.lua")
- shell.run("pastebin get iUuXr9je /system/updater.lua")
- print("\nIf this is a new install, please now run '/system/updater.lua' and choose no at the next prompt.\n\nIf not please now run 'qupdate'")
- continue = false
- break
- elseif key == 49 then
- continue = true
- break
- end
- end
- pastes = {"J9n73fsB", "H3erkhRc", "JS7FsH1F", "CJjXEKWx", "0YXPahu4"}
- locations = {"/startup.lua", "/system/drivers/audio.lua", "/system/drivers/display.lua", "/system/audioalerts.lua", "/system/compatibility/compat.lua"}
- names = {"Startup", "Audio Driver", "Display Driver", "Audio Alert Library", "Compatibility Layer"}
- optional = {false, false, false, false, false}
- function install(id, check, updating)
- if check and fs.exists(locations[id]) then
- fs.delete(locations[id])
- update = true
- elseif updating then
- update = true
- else
- update = false
- end
- shell.run("pastebin get "..pastes[id].." "..locations[id])
- if update then
- print("Updated "..names[id])
- else
- print("Installed "..names[id])
- end
- print()
- end
- function ask(id)
- if fs.exists(locations[id]) then
- fs.delete(locations[id])
- install(id, false, true)
- return
- end
- print()
- print("Would you like to install "..names[id].."? [Y/N]")
- while true do
- evt, key, held = os.pullEvent("key")
- if key == 21 then
- install(id, false, false)
- return
- elseif key == 49 then
- return
- end
- end
- end
- if continue then
- for id = 1,#pastes do
- if not optional[id] then
- install(id, true, false)
- else
- ask(id)
- end
- end
- print("IT IS RECOMMENDED YOU NOW REBOOT!")
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement