restore some commits

This commit is contained in:
Tobias Powalowski 2023-07-14 15:42:43 +02:00
parent a30f201984
commit c7e9492c1a

View file

@ -55,25 +55,21 @@ _timezone () {
_abort _abort
fi fi
done done
_CONTINUE="" _ZONES=""
while [[ -z "${_CONTINUE}" ]]; do for i in $(timedatectl --no-pager list-timezones | grep -w "${_REGION}" | cut -d '/' -f 2 | sort -u); do
_ZONES="" _ZONES="${_ZONES} ${i} -"
for i in $(timedatectl --no-pager list-timezones | grep -w "${_REGION}" | cut -d '/' -f 2 | sort -u); do
_ZONES="${_ZONES} ${i} -"
done
#shellcheck disable=SC2086
if _dialog --title " Timezone Menu " --menu "" 21 30 16 ${_ZONES} 2>${_ANSWER}; then
_SET_ZONE="1"
_ZONE=$(cat ${_ANSWER})
[[ "${_ZONE}" == "${_REGION}" ]] || _ZONE="${_REGION}/${_ZONE}"
_dialog --infobox "Setting Timezone to ${_ZONE}..." 3 50
timedatectl set-timezone "${_ZONE}"
sleep 3
_CONTINUE=1
else
_SET_ZONE=""
fi
done done
#shellcheck disable=SC2086
if _dialog --title " Timezone Menu " --menu "" 21 30 16 ${_ZONES} 2>${_ANSWER}; then
_SET_ZONE="1"
_ZONE=$(cat ${_ANSWER})
[[ "${_ZONE}" == "${_REGION}" ]] || _ZONE="${_REGION}/${_ZONE}"
_dialog --infobox "Setting Timezone to ${_ZONE}..." 3 50
timedatectl set-timezone "${_ZONE}"
sleep 3
else
_SET_ZONE=""
fi
done done
} }