This commit is contained in:
2024-02-22 21:52:11 +01:00
parent 462907003b
commit 44a080a9a4
3 changed files with 18 additions and 15 deletions

View File

@@ -1,4 +1,3 @@
local greetingText = "Dieser Installer begleitet Sie für wenige Sekunden bei der Installation eines sehr coolen Programmes. Bitte tun Sie, was das Programm sagt, sonst wird es sauer."
local headerText = "PowerManager - Installer\n"
local startOnBootText = "Beim Boot ausführen?"
local automaticUpdateText = "Automatisch updates herunterladen?"
@@ -7,11 +6,11 @@ local automaticUpdateText = "Automatisch updates herunterladen?"
local function askThatDamnUser(prompt)
while true do
print(">>> " .. prompt)
local userInput = term.read()
local userInput = io.read()
if userInput == "Y\n" then
if userInput == "Y" then
return true
elseif userInput == "N\n" then
elseif userInput == "N" then
return false
else
print("Hallo? => ( Y / N ) Nicht -> " .. userInput)
@@ -19,6 +18,7 @@ local function askThatDamnUser(prompt)
end
end
local startOnBoot = askThatDamnUser(startOnBootText)
local automaticUpdate = askThatDamnUser(automaticUpdateText)