Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function cleanup(file)
- if fs.exists(file) then
- print("Deleting " .. file)
- shell.run("delete", file)
- end
- end
- function download(programName, fileName, url)
- local fileStream = http.get(url)
- local fileData = fileStream.readAll()
- fileStream.close()
- local file = fs.open(fileName, "w")
- file.write(fileData)
- file.close()
- print(programName .. " program updated!")
- end
- cleanup("install.lua")
- download("Installer", "install.lua", "https://raw.githubusercontent.com/Jabulba/Turtle-LCars-OS/master/install.lua")
- shell.run("install.lua")
Add Comment
Please, Sign In to add comment