Stiepen

KilOS github updater minimal edition - downloader

Nov 17th, 2012
238
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.63 KB | None | 0 0
  1. local h, f = http.get("https://api.bitbucket.org/1.0/repositories/Kilobyte/kilos/raw/master/usr/bin/devupdate.lua"), fs.open("/usr/bin/devupdate.lua", "w")
  2. f.write(h.readAll())
  3. f.close()
  4. h.close()
  5.  
  6. if not fs.exists("/usr/lib") then fs.makeDir("/usr/lib") end
  7. h, f = http.get("https://api.bitbucket.org/1.0/repositories/Kilobyte/kilos/raw/master/usr/lib/json.lua"), fs.open("/usr/lib/json.lua", "w")
  8. f.write(h.readAll())
  9. f.close()
  10. h.close()
  11.  
  12. h, f = http.get("https://api.bitbucket.org/1.0/repositories/Kilobyte/kilos/raw/master/usr/lib/config.lua"), fs.open("/usr/lib/config.lua", "w")
  13. f.write(h.readAll())
  14. f.close()
  15. h.close()
Add Comment
Please, Sign In to add comment