Advertisement
SergOmarov

eepromInstall.lua

Aug 4th, 2015
317
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.56 KB | None | 0 0
  1. --eepromInstaller by SergOmarov
  2. local fs=component.proxy(component.list("filesystem")())
  3. local i=component.proxy(component.list("internet")())
  4.  
  5. local urls={--сюда пиши урл
  6.  
  7. }
  8.  
  9. local names={--сюда имена соотвествующих файлов
  10.  
  11. }
  12.  
  13. computer.getBootAddress=function() return addr end
  14. for j=1,#urls do
  15. local f=fs.open(names[j],"w")
  16. local url = "http://pastebin.com/raw.php?i=" ..urls[j]
  17. local result,resp=i.request(url)
  18. for chunk in resp do
  19.     string.gsub(chunk, "\r\n", "\n")
  20.  f:write(chunk)
  21. end
  22. f:close()
  23. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement