Zeanon

Generation Overview legacy Installer

May 3rd, 2022 (edited)
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.87 KB | None | 0 0
  1. -- Installer for GenerationOverview by Zeanon
  2. -- get it with pastebin get aUyxiBs0 install
  3. -- pastebin link: https://pastebin.com/aUyxiBs0
  4. local libURL = "https://raw.githubusercontent.com/Zeanon/ComputerCraft/master/lib/gui.lua"
  5. local lib2URL = "https://raw.githubusercontent.com/Zeanon/ComputerCraft/master/lib/color.lua"
  6. local startupURL = "https://raw.githubusercontent.com/Zeanon/ComputerCraft/master/legacy/DraconicReactorGenerationOverview/startup.lua"
  7. local runURL = "https://raw.githubusercontent.com/Zeanon/ComputerCraft/master/legacy/DraconicReactorGenerationOverview/run.lua"
  8. local generationOverviewURL = "https://raw.githubusercontent.com/Zeanon/ComputerCraft/master/DraconicReactorGenerationOverview/legacy/DaconicReactorGenerationOverview.lua"
  9. local lib, lib2, startup, run, generationOverview
  10. local libFile, lib2File, startupFile, runFile, generationOverviewFile
  11.  
  12. fs.makeDir("lib")
  13.  
  14. lib = http.get(libURL)
  15. libFile = lib.readAll()
  16.  
  17. local file1 = fs.open("lib/gui", "w")
  18. file1.write(libFile)
  19. file1.close()
  20.  
  21.  
  22. lib2 = http.get(lib2URL)
  23. lib2File = lib2.readAll()
  24.  
  25. local file2 = fs.open("lib/color", "w")
  26. file2.write(lib2File)
  27. file2.close()
  28.  
  29.  
  30. startup = http.get(startupURL)
  31. startupFile = startup.readAll()
  32.  
  33. local file3 = fs.open("startup", "w")
  34. file3.write(startupFile)
  35. file3.close()
  36.  
  37.  
  38. run = http.get(runURL)
  39. runFile = run.readAll()
  40.  
  41. local file4 = fs.open("run", "w")
  42. file4.write(runFile)
  43. file4.close()
  44.  
  45.  
  46. generationOverview = http.get(generationOverviewURL)
  47. generationOverviewFile = generationOverview.readAll()
  48.  
  49. local file5 = fs.open("DraconicReactorGenerationOverview", "w")
  50. file5.write(generationOverviewFile)
  51. file5.close()
  52.  
  53. if fs.exists("update") then
  54.     shell.run("delete update")
  55. end
  56. shell.run("pastebin get RD8sVpNn update")
  57.  
  58. if os.getComputerLabel() == null then
  59.     os.setComputerLabel("Reactor-Generation-Overview")
  60. end
  61.  
  62. shell.run("reboot")
Add Comment
Please, Sign In to add comment