Advertisement
Zeanon

Draconic Reactor Control Installer

Apr 24th, 2019 (edited)
251
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.56 KB | None | 0 0
  1. -- Installer for DraconicReactorControl by acidjazz and Zeanon
  2. -- get it with "pastebin get UKxFmqXx install"
  3. -- pastebin link: https://pastebin.com/UKxFmqXx
  4.  
  5. local guiLibURL = "https://raw.githubusercontent.com/Zeanon/ComputerCraft/master/lib/gui.lua"
  6. local startupURL = "https://raw.githubusercontent.com/Zeanon/ComputerCraft/master/DraconicReactorControl/startup.lua"
  7. local runURL = "https://raw.githubusercontent.com/Zeanon/ComputerCraft/master/DraconicReactorControl/run.lua"
  8. local reactorControlURL = "https://raw.githubusercontent.com/Zeanon/ComputerCraft/master/DraconicReactorControl/DraconicReactorControl.lua"
  9. local guiLib, startup, run, exe
  10. local guiLibFile, startupFile, runFile, exeFile
  11.  
  12.  
  13. fs.makeDir("lib")
  14.  
  15. guiLib = http.get(guiLibURL)
  16.  
  17. guiLibFile = fs.open("lib/gui", "w")
  18. guiLibFile.write(guiLib.readAll())
  19. guiLibFile.close()
  20. guiLib.close()
  21.  
  22.  
  23. startup = http.get(startupURL)
  24.  
  25. startupFile = fs.open("startup", "w")
  26. startupFile.write(startup.readAll())
  27. startupFile.close()
  28. startup.close()
  29.  
  30.  
  31. run = http.get(runURL)
  32.  
  33. runFile = fs.open("run", "w")
  34. runFile.write(run.readAll())
  35. runFile.close()
  36. run.close()
  37.  
  38.  
  39. exe = http.get(reactorControlURL)
  40.  
  41. exeFile = fs.open("DraconicReactor", "w")
  42. exeFile.write(exe.readAll())
  43. exeFile.close()
  44. exe.close()
  45.  
  46.  
  47. if fs.exists("update") then
  48.     shell.run("delete update")
  49. end
  50. shell.run("pastebin get UEi3KkwM update")
  51.  
  52. if os.getComputerLabel() == null then
  53.     os.setComputerLabel("Draconic-Reactor-Control")
  54. end
  55.  
  56. if fs.exists("install") then
  57.     shell.run("delete install")
  58. end
  59.  
  60. shell.run("reboot")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement