Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function save(path, content)
- local file = fs.open(path, "w")
- file.writeLine(content)
- file.close()
- end
- file = fs.open("database/OCM2/programName", "r")
- local fileData = {}
- local line = file.readLine()
- repeat
- table.insert(fileData, line)
- line = file.readLine()
- until line == nil
- file.close()
- local programName = fileData[1]
- shell.run("delete "..programName)
- print("updating...")
- shell.run("pastebin get uiAWwMGJ"..programName)
- term.clear()
- save("database/OCM2/state", "1")
- shell.run(programName)
Advertisement
Add Comment
Please, Sign In to add comment