Move showQuestions to lib.sh
This commit is contained in:
@@ -16,16 +16,13 @@ function checkPrerequisites() {
|
|||||||
checkCommands
|
checkCommands
|
||||||
}
|
}
|
||||||
|
|
||||||
function showQuestions() {
|
function getQuestions() {
|
||||||
local timezones questions question
|
local timezones
|
||||||
timezones="`systemsetup -listtimezones | tail -n +2 | awk '{print $1}' | paste -sd, -`"
|
timezones="`systemsetup -listtimezones | tail -n +2 | awk '{print $1}' | paste -sd, -`"
|
||||||
questions=(
|
questions=(
|
||||||
'i: hostname=What shall the hostname of this host be?'
|
'i: hostname=What shall the hostname of this host be?'
|
||||||
's: timezone=What shall the timezone of this host be? # choose from:'"${timezones};"
|
's: timezone=What shall the timezone of this host be? # choose from:'"${timezones};"
|
||||||
)
|
)
|
||||||
for question in ${questions}; do
|
|
||||||
hio info "${question}"
|
|
||||||
done
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function quitSystemPreferences() {
|
function quitSystemPreferences() {
|
||||||
|
|||||||
@@ -26,6 +26,14 @@ function checkCommands() {
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function showQuestions() {
|
||||||
|
local questions=()
|
||||||
|
getQuestions
|
||||||
|
for question in ${questions}; do
|
||||||
|
hio info "${question}"
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
function module_main() {
|
function module_main() {
|
||||||
autoloadZShLib || return
|
autoloadZShLib || return
|
||||||
checkPrerequisites || return
|
checkPrerequisites || return
|
||||||
|
|||||||
Reference in New Issue
Block a user