Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local oldPull = os.pullEvent
- os.pullEvent = os.pullEventRaw
- --this program for my OS is for the Finding of updates, and the Gathering of information of said update, it also acts as an Installer for first-time start up
- Temp_UpdateID = nil
- local Temp_State = "Start"
- Temp_V = ""
- local MenuLoc = nil
- local UpdateHandlerLoc = nil
- start()
- function start()
- if settings.get("SystemState") == "firstStart" then
- InstallSystem()
- else
- NormalOperations()
- end
- end
- function InstallSystem()
- local h = fs.open(".SystemDefiner","r")
- resp = http.get("pastebin","get","kyxapAuY",h.readLine(2)) --BootLoader
- resp = http.get("pastebin","get","1MXN4GWi",h.readLine(6)) --Menu
- resp = http.get("pastebin","get","",h.readLine(12)) --Security
- resp = http.get("pastebin","get","v1F8pTVs","start") --Starting File
- resp = http.get("pastebin","get","stV5TiqN",".Enc_TypeA") --Encryption Type A
- h.close()
- shell.run(".SystemFileManager","FirstTime","n")
- end
- function NormalOperations()
- resp = http.get("pastebin","get","PxasuGsy","Temp_LatestVersion_OS") --Used to compare OS version to latest Version
- h = fs.open(".SystemDefiner","r")
- UpdateHandlerLoc = h.readLine(10)
- MenuLoc = h.readLine(6)
- h.close()
- local h = fs.open("Temp_LatestVersion_OS","r")
- Temp_V = settings.get("OS_Version")
- local LatVersion = h.readLine(2)
- h.close()
- if LatVersion ~= Temp_V then
- shell.run(UpdateHandlerLoc)
- else
- fs.delete("Temp_LatestVersion_OS")
- shell.run(MenuLoc)
- end
- end
- os.pullEvent = oldPull
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement