Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print "Checking For Updates..."
- shell.run("pastebin", "get", "Y3nhz2VP", "/.verCheck")
- f = fs.open("/.verCheck", "r")
- verCode = f.readLine()
- f.close()
- if(fs.exists("/.version"))then
- f = fs.open("/.version", "r")
- olVer = f.readLine()
- f.close()
- if(olVer == verCode)then
- print "No Update Available"
- fs.delete("/.verCheck")
- else
- print("Update Ver "..verCode.." Available Downloading...")
- shell.run("pastebin", "get", "QPqvC7qu", "newUpdate")
- fs.delete("/.verCheck")
- f = fs.open("/.version", "w")
- f.writeLine(verCode)
- f.close()
- print "Update Downloaded!"
- print "Running Installer"
- shell.run("newUpdate")
- fs.delete("newUpdate")
- end
- else
- f = fs.open("/.version", "w")
- f.writeLine("UpdateRequired")
- f.close()
- shell.run(shell.getRunningProgram())
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement