sethxi

Quartz Installer

Jun 27th, 2014
263
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. if http then
  2. local url = "https://raw.github.com/Sxw1212/Quartz/master/"
  3. local files = http.get(url .. "files")
  4. if files then
  5. local list = loadstring(files.readAll())()
  6. for k,v in pairs(list) do
  7. local content = http.get(url .. v)
  8. if content then
  9. -- Make sure its clean and folder exists. Theres probably a better way.
  10. fs.delete("/" .. v)
  11. fs.makeDir("/" .. v)
  12. fs.delete("/" .. v)
  13. local fh = fs.open("/" .. v, "w")
  14. fh.write(content.readAll())
  15. fh.close()
  16. end
  17. end
  18. else
  19. print("Unable to get files")
  20. end
  21. else
  22. print("HTTP required")
  23. end
Advertisement
Add Comment
Please, Sign In to add comment