iMajesticButter

Setup CC Tweaked door Keypad/Door

Nov 29th, 2021
743
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- installs the cc door system
  2.  
  3. print("installing github cloner");
  4. shell.run("pastebin run p8PJVxC4");
  5. sleep(3);
  6.  
  7. print("creating install/update script");
  8. local file = fs.open("/install", "w");
  9.  
  10. local repoName = "";
  11.  
  12. print("'keypad' or 'door'?");
  13. local version = read();
  14. if version == "keypad" then
  15.     repoName = "computercraftDoorSystem-keypad";
  16. elseif version == "door" then
  17.     repoName = "computercraftDoorSystem-door";
  18. else
  19.     print("invalid version!");
  20.     return;
  21. end
  22.  
  23. file.writeLine("shell.run(\"github clone iMajesticButter/" .. repoName .. " -b main ./\")");
  24.  
  25. print("enter startup script name");
  26. local startName = read();
  27.  
  28. file.writeLine("print(\"updating startup script\")");
  29. file.writeLine("fs.delete(\"/startup\")");
  30. file.writeLine("fs.copy(\"/" .. startName .. "\", \"/startup\")");
  31. file.writeLine("fs.delete(\"/" .. startName .. "\")");
  32. file.writeLine("shell.run(\"reboot\")");
  33. file.close();
  34.  
  35. print("running install script");
  36. shell.run("/install");
RAW Paste Data