Advertisement
Guest User

gitlab

a guest
Mar 22nd, 2019
253
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.68 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. while true do
  12.     local filename = filelist.readLine()
  13.     if filename ~= nil then
  14.         print(filename)
  15.         local github_url = "https://gitlab.mntn.dev/"..github_user.."/"..github_repo.."/raw/"..github_branch.."/"..filename
  16.  
  17.         local request = http.get( github_url )
  18.         local response = request.readAll()
  19.         request.close()
  20.  
  21.         local file = fs.open( filename, "w" )
  22.         file.write( response )
  23.         file.close()
  24.     else
  25.         break
  26.     end
  27. end
  28.  
  29. filelist.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement