Advertisement
EtzGamer

[CC] Circles Demo Installer

Jul 3rd, 2016
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.28 KB | None | 0 0
  1. term.clear()
  2. term.setCursorPos(1, 1)
  3. print("Circles Demo Installer")
  4. print()
  5. write("This installer will make a new directory named 'circles-demo'. This will overwrite existing data!")
  6. print()
  7. print()
  8. print("Any Other Key = Yes / Continue")
  9. print("N = No / Exit")
  10. print()
  11. local userInput = read()
  12.  
  13. if (userInput.lower == "n") then
  14.     print("Rebooting.")
  15.     os.reboot()
  16. end
  17.  
  18. --[[term.clear()
  19. term.setCursorPos(1, 1)
  20. print("Circles Demo Installer")
  21. print()
  22. write("Which build of the API do you want to install?")
  23. print()
  24. print()
  25. print("1 = Default")
  26. print("2 = Bleeding Edge")
  27. print()
  28. local userInput = read()--]]
  29.  
  30. --[[if (userInput.lower == "1") or (userInput.lower == "2") then
  31.    
  32. else
  33.     error("Invalid user input.")
  34. end]]--
  35.  
  36. print()
  37. print("Checking for any existing files.")
  38. if (fs.exists("circles-demo")) then
  39.     print("'circles-demo' was found! Removing...")
  40.     fs.delete("circles-demo")
  41.     print("Removed!")
  42. else
  43.     print("'circles-demo' was not found. Continuing.")
  44. end
  45.  
  46. print("Creating 'circles-demo' directory...")
  47. fs.makeDir("circles-demo")
  48. print("Created!")
  49.  
  50. print("Downloading files into 'circles-demo'...")
  51. shell.run("pastebin get RZsm70tu circles-demo/demo")
  52. shell.run("pastebin get dnegTmJY circles-demo/circles")
  53. print("Done!")
  54. print("Now exiting installer.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement