shellcheck fixes

This commit is contained in:
Tobias Powalowski 2023-07-21 15:27:59 +02:00
parent 3910746c26
commit 28f76bcb52

View file

@ -64,10 +64,10 @@ _timeset() {
if [[ -z "${_SET_TIME}" ]]; then
timedatectl set-ntp 0
# display and ask to set date/time
_dialog --title " Date " --no-cancel --calendar "Use <TAB> to navigate and arrow keys to change values." 0 0 0 0 0 2> ${_ANSWER}
_DATE="$(cat ${_ANSWER})"
_dialog --title " Time " --no-cancel --timebox "Use <TAB> to navigate and up/down to change values." 0 0 2> ${_ANSWER}
_TIME="$(cat ${_ANSWER})"
_dialog --title " Date " --no-cancel --calendar "Use <TAB> to navigate and arrow keys to change values." 0 0 0 0 0 2>"${_ANSWER}"
_DATE="$(cat "${_ANSWER}")"
_dialog --title " Time " --no-cancel --timebox "Use <TAB> to navigate and up/down to change values." 0 0 2>"${_ANSWER}"
_TIME="$(cat "${_ANSWER}")"
# save the time
# DD/MM/YYYY hh:mm:ss -> YYYY-MM-DD hh:mm:ss
_DATETIME="$(echo "${_DATE}" "${_TIME}" | sed 's#\(..\)/\(..\)/\(....\) \(..\):\(..\):\(..\)#\3-\2-\1 \4:\5:\6#g')"