Advertisement
HPWebcamAble

[CC] Table Explorer Installer

Feb 16th, 2016
329
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.72 KB | None | 0 0
  1. -- This program downloads my 'Table Explorer' program from Github
  2. -- View it on Github here:
  3. -- https://github.com/hpwebcamABLE/Table-Explorer
  4.  
  5. local fileName = "te"
  6. local fullName = "Table Explorer"
  7. local url = [[https://raw.githubusercontent.com/hpwebcamABLE/Table-Explorer/master/Table%20Explorer]]
  8.  
  9. if not http then
  10.   printError("HTTP must  be enabled!") return
  11. end
  12.  
  13. local response = http.get(url)
  14.  
  15. if not response then
  16.   printError("No response from github!") return
  17. end
  18.  
  19. local f = fs.open(fileName,"w")
  20.  
  21. if not f then
  22.   printError("Unable to open file!") return
  23. end
  24.  
  25. f.write( response.readAll() )
  26. f.close()
  27. if term.isColor() then term.setTextColor(colors.lime) end
  28. print(fullName .. " has been installed!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement