Advertisement
melzneni

sys2_installer

Feb 19th, 2020
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  1. local bootUnitId = "N25Gefez"
  2. local serviceUnitId = "X8Y9J7SA"
  3. local rootId = "1fJmTiyA"
  4. local toStartupId = "kX1sGvz7"
  5. local syslibId = "z8ED7hwB"
  6. local turtleUnitId="6Bg1ZDv1"
  7. while true do
  8. print("install as? [bootUnit, serviceUnit, turtleUnit, root]")
  9. io.write("choice>")
  10. local input = read()
  11. local id
  12. if input == "root" then id = rootId
  13. elseif input == "bootUnit" then id = bootUnitId
  14. elseif input == "serviceUnit" then id = serviceUnitId
  15. elseif input == "turtleUnit" then id = turtleUnitId
  16. else print("invalid answer: ", input)
  17. end
  18. if id ~= nil then
  19. io.write("set a label? [empty is no]")
  20. input = read()
  21. if input ~= "" then
  22. os.setComputerLabel(input)
  23. end
  24. shell.run("mkdir", "sys")
  25. shell.run("cd", "sys")
  26. shell.run("delete", "syslib")
  27. shell.run("pastebin", "get", syslibId, "syslib")
  28. shell.run("cd", "..")
  29. shell.run("pastebin", "run", toStartupId, id)
  30. os.reboot()
  31. break
  32. end
  33. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement