functionalize _run_update_environment

This commit is contained in:
Tobias Powalowski 2023-07-18 07:32:48 +02:00
parent bf1f77bc1e
commit 7e27ab091b
3 changed files with 13 additions and 16 deletions

View file

@ -66,14 +66,7 @@ _manage() {
if [[ "${_EXIT}" == "FULL" ]]; then
update -full-system
elif [[ "${_EXIT}" == "UPDATE" ]]; then
clear
echo -e "\e[93mGo and get a cup of coffee. Depending on your system setup,\e[m"
echo -e "\e[93myou can \e[1mstart\e[m\e[93m with your tasks in about \e[1m5\e[m\e[93m minutes...\e[m"
if update | grep -q latest-install; then
update -latest-install
else
update -latest
fi
_run_update_environment
elif [[ "${_EXIT}" == "IMAGE" ]]; then
update -latest-image
fi

View file

@ -106,14 +106,7 @@ _update_environment() {
else
_dialog --title " New Kernel Available " --defaultno --yesno "Do you want to update the Archboot Environment to ${_ONLINE_KERNEL}?\n\nATTENTION:\nThis will reboot the system using kexec!" 9 60 && _UPDATE_ENVIRONMENT=1
if [[ -n "${_UPDATE_ENVIRONMENT}" ]]; then
clear
echo -e "\e[93mGo and get a cup of coffee. Depending on your system setup,\e[m"
echo -e "\e[93myou can \e[1mstart\e[m\e[93m with your tasks in about \e[1m5\e[m\e[93m minutes...\e[m"
if update | grep -q latest-install; then
update -latest-install
else
update -latest
fi
_run_update_environment
fi
fi
fi

View file

@ -48,4 +48,15 @@ _cleanup() {
clear
exit 0
}
_run_update_environment() {
clear
echo -e "\e[93mGo and get a cup of coffee. Depending on your system setup,\e[m"
echo -e "\e[93myou can \e[1mstart\e[m\e[93m with your tasks in about \e[1m5\e[m\e[93m minutes...\e[m"
if update | grep -q latest-install; then
update -latest-install
else
update -latest
fi
}
# vim: set ft=sh ts=4 sw=4 et: