Advertisement
Guest User

Untitled

a guest
Mar 22nd, 2019
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. local tArgs = { ... }
  2.  
  3. -- Config
  4. local github_user = "tgiv014"
  5. local github_repo = "cc"
  6. local github_branch = "master"
  7.  
  8. --
  9. local filelist = fs.open("files.dl", "r")
  10.  
  11. local filename = "files.dl"
  12.  
  13. while true do
  14. if filename ~= nil then
  15. print(filename)
  16. local github_url = "https://gitlab.mntn.dev/"..github_user.."/"..github_repo.."/raw/"..github_branch.."/"..filename
  17.  
  18. local request = http.get( github_url )
  19. local response = request.readAll()
  20. request.close()
  21.  
  22. local file = fs.open( filename, "w" )
  23. file.write( response )
  24. file.close()
  25. filename = filelist.readLine()
  26. else
  27. break
  28. end
  29. end
  30.  
  31. filelist.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement