daily pastebin goal
0%
SHARE
TWEET

Untitled

a guest Mar 22nd, 2019 76 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top