Advertisement
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="https://bitbucket.org/api/1.0/repositories/expert700/gordon-ramsbot/raw/ComputerCraft/gr.lua", fileloc="gr/gr.lua"},
- [2] = {link="https://bitbucket.org/api/1.0/repositories/expert700/gordon-ramsbot/raw/ComputerCraft/installer.lua", fileloc="gr/installer.lua"}
- }
- for k,v in pairs(files) do
- if fs.exists(v.fileloc) then
- fs.delete(v.fileloc)
- end
- end
- for k,v in pairs(files) do
- local response = http.get(v.link)
- local file = response.readAll()
- local handle = fs.open(v.fileloc, "w")
- handle.write(file)
- handle.close()
- end
- os.reboot()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement