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