Advertisement
Piorjade

ComputerCraft doorOS3.0 Installer

Jun 2nd, 2016
899
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. --Basic doorOS3.0 Installer
  2. --Just run this directly
  3. --This downloads the OS, which is compiled by my MSI-Maker and unpacks it in the root directory, thats why you can't really see the source code
  4. --To view the OS code: https://github.com/Piorjade/DoorOS-3.0-ComputerCraft-
  5.  
  6.  
  7. shell.run("pastebin get 3bftaSuN tmp")
  8. shell.run("tmp /")
  9.  
  10.  
  11. local function writeStartup(f)
  12. local file = fs.open(f, "w")
  13. file.write("shell.run('/doorOS/sys/os.lua')")
  14. file.close()
  15. end
  16.  
  17. local function r()
  18. print("Do you want the OS to start at boot? (y/n)")
  19. repeat
  20. str = read()
  21. until str == "y" or str == "n"
  22. if str == "y" then
  23. writeStartup("/startup")
  24. os.reboot()
  25. else
  26. writeStartup("/bootDoorOS")
  27. print("Finished! To boot the os: /bootDoorOS")
  28. end
  29. end
  30. r()
  31. fs.delete("tmp")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement