Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local version = "1.50" --change this to allow for an update (4 chars only)
- local filename = "update" --change this to the name of the file holding this program
- local paste = "TKDQVfbj" --change this to the pastebin entry code
- local function update()
- local url = "http://pastebin.com/raw/"..paste
- local temp = http.get(url)
- local ver = string.sub(temp.readLine(), 18, 21)
- print(version..":"..ver)
- if ver ~= version then
- fs.delete(filename)
- shell.run("pastebin get "..paste.." "..filename)
- shell.run(filename)
- return true
- end
- return false
- end
- --end instance of previous version if updated
- if update() then
- error()
- end
- --program code can go down here
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement