Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- programs = {
- Gui = {
- link = 'f6djY9FP',
- path = '/core/'
- },
- Main = {
- link = 'RKBCni9R',
- path = '/'
- }
- }
- function printInfo(...)
- term.setTextColor(colors.green)
- print(...)
- term.setTextColor(colors.white)
- end
- function deleteIfExists(path)
- print(path)
- if fs.exists(path) then shell.run("rm", path) end
- end
- --delete programs
- printInfo("Delete existing programs...")
- for k, v in pairs(programs) do
- deleteIfExists(v.path .. k)
- end
- --download programs
- printInfo("Download new programs...")
- for k, v in pairs(programs) do
- shell.run('pastebin', 'get', v.link, v.path .. k)
- end
- printInfo("Ready!")
Add Comment
Please, Sign In to add comment