Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- v 1.02
- local ujverzio
- local regiverzio
- function clear()
- term.clear()
- term.setCursorPos(1,1)
- end
- local function updateStartup()
- clear()
- shell.run("pastebin","get","46fcnT3t","update")
- local file = fs.open("update", "r")
- lx = file.readLine()
- s1 = lx:find("v")
- ujverzio = tonumber(lx:sub(s1+2))
- file.close()
- clear()
- print("Uj verzio: ", ujverzio)
- sleep(1)
- local file = fs.open("startup", "r")
- lx = file.readLine()
- s1 = lx:find("v")
- regiverzio = tonumber(lx:sub(s1+2))
- file.close()
- print("regi verzio: ", regiverzio)
- sleep(1)
- if regiverzio < ujverzio or regiverzio > ujverzio then
- fs.delete("startup")
- fs.copy("update", "startup")
- fs.delete("update")
- shell.run("startup")
- else
- fs.delete("update")
- clear()
- print("nincs elerheto frissites")
- sleep(1)
- return false
- end
- end
- updateStartup()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement