Advertisement
knuckleheadJoe

kjturtle updater

Sep 21st, 2014
235
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.94 KB | None | 0 0
  1. -- ***************************************************************************
  2. -- kjturtle updater
  3. --
  4. -- Author: knuckleheadJoe
  5. -- Date: 2014-09-21
  6. --
  7. -- Much of the code for this updater was copied from Kingdaro's craftbang
  8. -- source code. @see https://github.com/Kingdaro/CraftBang
  9. --
  10. -- ***************************************************************************
  11.  
  12. if not http then
  13.     print "It doesn't seem like you have http enabled."
  14.     print "Enable it first, restart minecraft, then run the installer again."
  15.     return
  16. end
  17.  
  18. local url = "https://github.com/jmcaffee/kjturtle/raw/master/installer"
  19. local instPath = ".kjturtleinstaller"
  20.  
  21. print "Downloading installer"
  22.  
  23. local download = http.get(url)
  24. if download then
  25.     local file = fs.open(instPath, 'w')
  26.     file.write(download.readAll())
  27.     file.close()
  28.     download.close()
  29.  
  30.     shell.run(instPath)
  31.     fs.delete(instPath)
  32. else
  33.     print "Couldn't get installer"
  34. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement