Advertisement
osmarks

PotatOS Install Mage

Aug 28th, 2019
365
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.79 KB | None | 0 0
  1. local args = {...}
  2. local mode = table.remove(args, 1)
  3. if mode == "echo" then
  4.     print(table.concat(args, " "))
  5.     return
  6. end
  7.  
  8. textutils.pagedPrint [[:: Welcome to the PotatOS Install Mage!
  9. :: This mage will install PotatOS Tau OS/Conveniently Self-Propagating System/Sandbox/Compilation of Useless Programs, latest rolling release.
  10.  
  11. We are not responsible for
  12. - headaches
  13. - rashes
  14. - persistent/non-persistent coughs
  15. - scalp psoriasis
  16. - seborrhoeic dermatitis
  17. - virii/viros/virorum/viriis
  18. - backdoors
  19. - lack of backdoors
  20. - actually writing documentation
  21. - this project's horrible code
  22. - spinal cord sclerosis
  23. - hypertension
  24. - SCP-3125
  25. - cardiac arrest
  26. - regular arrest, by police or whatever
  27. - angry mobs with or without pitchforks
  28. - fourteenth plane politics
  29. - Nvidia's Linux drivers
  30. - death
  31. - catsplosions
  32. - unicorn instability
  33. - the Problem of Evil
  34. - computronic discombobulation
  35. - loss of data
  36. - gain of data
  37. - frogs
  38. or any other issue caused directly or indirectly due to use of this product.
  39. ]]
  40.  
  41. print ":: Please configure your install."
  42.  
  43. local function prompt(question, default)
  44.     local text = "> " .. question
  45.     if default then text = text .. " [" .. tostring(default) .. "]" end
  46.     text = text .. ": "
  47.     write(text)
  48.     local input = read()
  49.     if input == "" then return default else return input end
  50. end
  51.  
  52. local function binary_prompt(question)
  53.     return prompt(question .. " (y/n)", "n"):lower():match "y" or false
  54. end
  55.  
  56. settings.set("potatOS.hidden", binary_prompt("Enable mode2?"))
  57. settings.set("potatOS.disable_backdoors", binary_prompt("Disable remote debugging?"))
  58. settings.set("potatOS.removable", binary_prompt("Enable hedgehog-based uninstall?"))
  59. settings.set("potatOS.pjals_mode", binary_prompt("Enable Pjals Mode?"))
  60. settings.save ".settings"
  61.  
  62. print "\n:: Press Any key to finalize installation."
  63. coroutine.yield "key"
  64. shell.run "pastebin run RM13UGFa"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement