Advertisement
timia2109

LyricCore

Oct 31st, 2014
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.50 KB | None | 0 0
  1. -- L8r here --
  2. -- I NEED THE URL!!! --
  3. -- FORCE UPDATE --
  4. local function update(pUrl, pPath)
  5.     print("Get from "..pUrl)
  6.     local req = http.get(pUrl)
  7.     if req then
  8.         local f = fs.open(pPath,"w")
  9.         print("Save to "..pPath)
  10.         f.write(req.readAll())
  11.         f.close()
  12.         req.close()
  13.         print("Install "..pPath.." complete")
  14.         return "nIL :D"
  15.     else
  16.         error("Can't get "..pPath.."\nIs "..pUrl.." on HTTP WL?",0)
  17.     end
  18. end
  19.  
  20. update("http://pastebin.com/CSDPraK3","LyricCore")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement