Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- All the hipsters have multiple files 'n downloaders 'n shit.
- So now I have one too :3
- ]]--
- local files = {
- [1] = {link="http://pastebin.com/raw.php?i=GiqR4v5D",fileloc="startup"},
- [2] = {link="http://pastebin.com/raw.php?i=Zmh8exGM",fileloc="foodstuffs"},
- [3] = {link="http://pastebin.com/raw.php?i=3EUYtAEx",fileloc="update"},
- [4] = {link="http://pastebin.com/raw.php?i=ZV2Ppb7q",fileloc="createrecipe"},
- [5] = {link="http://pastebin.com/raw.php?i=FpjkD0fR",fileloc="addfood"},
- [6] = {link="http://pastebin.com/raw.php?i=hNtg8cvP",fileloc="menuApi"},
- [7] = {link="http://pastebin.com/raw.php?i=myQdJxPV",fileloc="multifood"},
- [8] = {link="http://pastebin.com/raw.php?i=U79DxukS",fileloc="search"},
- }
- existing = {}
- for k,v in pairs(files) do
- if fs.exists(v.fileloc) then
- table.insert(existing, v.fileloc)
- end
- end
- for k,v in pairs(existing) do
- fs.delete(v)
- end
- for k,v in pairs(files) do
- response = http.get(v.link)
- file = response.readAll()
- handle = fs.open(v.fileloc, "w")
- handle.write(file)
- handle.close()
- end
- os.reboot()
Add Comment
Please, Sign In to add comment