Advertisement
tajampi

Untitled

Jul 22nd, 2014
257
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function exit()
  2.  
  3.   sleep(0.5)
  4.   error()
  5. end
  6.  
  7. function getFile(url, filename)
  8. local downloadFile = http.get(url)
  9. local handle = downloadFile.readAll()
  10. downloadFile.close()
  11. local cFile = fs.open(filename, "w")
  12. cFile.write(handle)
  13. cFile.close()
  14. end
  15. print("Welcome to TajamSoft PassWord Creator Installer")
  16. sleep(0.4)
  17. print("This will install Tjs PassCreator in your computer")
  18. sleep(0.5)
  19. print("Files to download: tjsPassUpdater, passCreator.")
  20. sleep(0.5)
  21. print("Checking for old installation")
  22. if fs.exists("/passCreator") or fs.exists("/passCreatorFiles") then
  23.   print("Old installation found!")
  24.   print("Cannot install, delete old files or run updater...")
  25.   exit()
  26. else
  27.   print("No installation found, starting to download...")
  28. end
  29. sleep(1)
  30. getFile("https://raw.githubusercontent.com/tatjam/PassCreator/master/passCreator.lua", "/passCreator")
  31. print("Got passCreator main file...")
  32. sleep(0.5)
  33. print("Will create dirs...")
  34. fs.makeDir("/passCreatorFiles")
  35. print("Done!, downloading updater...")
  36. getFile("https://raw.githubusercontent.com/tatjam/PassCreator/master/passCUpdater","/passCreatorFiles/passCUpdater")
  37. sleep(0.1)
  38. print("Done!, downloading version data...")
  39. getFile("https://raw.githubusercontent.com/tatjam/PassCreator/master/version","/passCreatorFiles/versionData")
  40. print("Got it!, getting UtilsAPI")
  41. getFile("https://raw.githubusercontent.com/tatjam/PassCreator/master/UtilsAPI","/UtilsAPI")
  42. print("Done!")
  43. sleep(1)
  44. print("The update is done!")
  45. sleep(0.5)
  46. textutils.slowPrint(" I RECOMMEND to reboot after the installation")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement