fix: broken update menu

This commit is contained in:
th33xitus
2021-03-27 00:04:25 +01:00
parent f369c132d2
commit 67f6a2c599

View File

@@ -1,13 +1,8 @@
update_ui(){ update_ui(){
ui_print_versions
top_border top_border
echo -e "| ${green}~~~~~~~~~~~~~~ [ Update Menu ] ~~~~~~~~~~~~~~${default} | " echo -e "| ${green}~~~~~~~~~~~~~~ [ Update Menu ] ~~~~~~~~~~~~~~${default} | "
hr hr
#echo -e "| Check the following website for important software | "
#echo -e "| changes to the config file before updating Klipper: | "
#echo -e "| | "
#echo -e "| ${yellow}https://www.klipper3d.org/Config_Changes.html${default} | "
#bottom_border
#top_border
echo -e "| 0) $BB4U_STATUS| " echo -e "| 0) $BB4U_STATUS| "
hr hr
echo -e "| a) [Update all] | | | " echo -e "| a) [Update all] | | | "
@@ -32,84 +27,35 @@ update_ui(){
} }
update_menu(){ update_menu(){
print_header
#check system updates and compare component versions
ui_print_versions
print_msg && clear_msg
read_bb4u_stat read_bb4u_stat
update_ui do_action "" "update_ui"
while true; do while true; do
read -p "${cyan}Perform action:${default} " action; echo read -p "${cyan}Perform action:${default} " action; echo
case "$action" in case "$action" in
0) 0)
clear do_action "toggle_backups" "update_ui";;
print_header
toggle_backups
print_msg && clear_msg
update_ui;;
1) 1)
clear do_action "update_klipper" "update_ui";;
print_header
update_klipper && ui_print_versions
print_msg && clear_msg
update_ui;;
2) 2)
clear do_action "update_moonraker" "update_ui";;
print_header
update_dwc2fk && ui_print_versions
print_msg && clear_msg
update_ui;;
3) 3)
clear do_action "update_mainsail" "update_ui";;
print_header
update_dwc2 && ui_print_versions
print_msg && clear_msg
update_ui;;
4) 4)
clear do_action "update_fluidd" "update_ui";;
print_header
update_moonraker && ui_print_versions
print_msg && clear_msg
update_ui;;
5) 5)
clear do_action "update_klipperscreen" "update_ui";;
print_header
update_mainsail && ui_print_versions
print_msg && clear_msg
update_ui;;
6) 6)
clear do_action "update_dwc2fk" "update_ui";;
print_header
update_fluidd && ui_print_versions
print_msg && clear_msg
update_ui;;
7) 7)
clear do_action "update_dwc2" "update_ui";;
print_header
update_klipperscreen && ui_print_versions
print_msg && clear_msg
update_ui;;
8) 8)
clear do_action "update_system" "update_ui";;
print_header
update_system && ui_print_versions
print_msg && clear_msg
update_ui;;
a) a)
clear do_action "update_all" "update_ui";;
print_header
update_all && ui_print_versions
print_msg && clear_msg
update_ui;;
Q|q) Q|q)
clear; main_menu; break;; clear; main_menu; break;;
*) *)
clear deny_action "update_ui";;
print_header
print_unkown_cmd
print_msg && clear_msg
ui_print_versions
update_ui;;
esac esac
done done
update_menu update_menu