@@ -27,19 +27,6 @@ main_menu() {
2727 elif [ " $prior_installation " == " False" ]; then
2828 printf " \e[48;5;143m \e[49m \e[48;5;29m \e[49m \e[48;5;29m \e[49m \e[48;5;29m \e[49m \e[48;5;143m \e[m Prior AFC-Klipper-Add-On installation detected: $RED %s$RESET \n" $prior_installation
2929 fi
30- if [ " $force_update " == " True" ] && [ " $prior_installation " == " True" ]; then
31- printf " \e[48;5;143m \e[49m \e[48;5;29m \e[49m \e[48;5;29m \e[49m \e[48;5;29m \e[49m \e[48;5;143m \e[m Force Update Required: $RED %s$RESET \n" $force_update
32- export message=" " "
33- ${RED} Due to significant configuration changes, your system must be updated. This will require
34- the complete installation/re-installation of your configuration files. Your existing
35- configuration (if present) will be backed up and new configuration files will be written.
36-
37- If you do not want to proceed, please exit the script. However, until this process is
38- completed you will not be able to use this assisted process for any future updates.
39- " " "
40- else
41- printf " \e[48;5;143m \e[49m \e[48;5;29m \e[49m \e[48;5;29m \e[49m \e[48;5;29m \e[49m \e[48;5;143m \e[m Force Update Required: $GREEN %s$RESET \n" $force_update
42- fi
4330 printf " \e[48;5;143m \e[49m \e[48;5;29m \e[49m \e[48;5;29m \e[49m \e[48;5;29m \e[49m \e[48;5;143m \e[m \n"
4431 printf " \e[48;5;143m \e[49m \e[48;5;29m \e[49m \e[48;5;29m \e[49m \e[48;5;29m \e[49m \e[48;5;143m \e[m \n"
4532 printf " \e[48;5;143m \e[49m \e[48;5;29m \e[49m \e[48;5;29m \e[49m \e[48;5;29m \e[49m \e[48;5;143m \e[m 1. Printer Config Directory : %s \n" $printer_config_dir
@@ -59,12 +46,10 @@ completed you will not be able to use this assisted process for any future updat
5946 printf " █%b Type a number or letter and press Enter/Return to toggle choice%b █\n" " $RESET " " $MENU_GREEN "
6047 printf " ${MENU_GREEN} ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀${RESET} \n"
6148 echo " "
62- if [ " $force_update " == " True" ] && [ " $prior_installation " == " True" ]; then
63- printf " I. Install New System\n"
64- elif [ " $prior_installation " == " False" ] && [ " $files_updated_or_installed " == " False" ]; then
49+ if [ " $prior_installation " == " False" ] && [ " $files_updated_or_installed " == " False" ]; then
6550 printf " I. Install New System\n"
6651 fi
67- if [ " $prior_installation " == " True" ] && [ " $force_update " == " False " ] ; then
52+ if [ " $prior_installation " == " True" ]; then
6853 printf " U. Update AFC Klipper Add-On\n"
6954 fi
7055 printf " A. Install Additional System\n"
@@ -76,33 +61,20 @@ completed you will not be able to use this assisted process for any future updat
7661
7762 choice=" ${choice^^} "
7863 case $choice in
79- 1)
80- export message=" To change the printer config directory, please re-run this script with a '-m <path>' option." ;;
81- 2)
82- export message=" To change the klipper directory, please re-run this script with a '-k <path>' option." ;;
83- 3)
84- export message=" To change the moonraker config file, please re-run this script with a '-m <path>' option." ;;
85- 4)
86- export message=" To change the klipper service name, please re-run this script with a '-s <name>' option." ;;
87- 5)
88- export message=" To change the branch, please re-run this script with a '-b <branch>' option." ;;
89- 6)
90- export message=" To change the moonraker address, please re-run this script with a '-a <address>' option.\n"
91- export message+=" To change the moonraker port, please re-run this script with a '-n <moonraker port>' option." ;;
92- I)
93- install_menu ;;
94- U)
95- update_menu ;;
96- R)
97- uninstall_afc ;;
98- C)
99- utilities_menu ;;
100- A)
101- additional_system_menu ;;
102- Q)
103- exit_afc_install ;;
104- * )
105- echo " Invalid choice" ;;
64+ 1) export message=" To change the printer config directory, please re-run this script with a '-m <path>' option." ;;
65+ 2) export message=" To change the klipper directory, please re-run this script with a '-k <path>' option." ;;
66+ 3) export message=" To change the moonraker config file, please re-run this script with a '-m <path>' option." ;;
67+ 4) export message=" To change the klipper service name, please re-run this script with a '-s <name>' option." ;;
68+ 5) export message=" To change the branch, please re-run this script with a '-b <branch>' option." ;;
69+ 6) export message=" To change the moonraker address, please re-run this script with a '-a <address>' option.\n"
70+ message+=" To change the moonraker port, please re-run this script with a '-n <moonraker port>' option." ;;
71+ I) install_menu ;;
72+ U) update_menu ;;
73+ R) uninstall_afc ;;
74+ C) utilities_menu ;;
75+ A) additional_system_menu ;;
76+ Q) exit_afc_install ;;
77+ * ) echo " Invalid choice" ;;
10678 esac
10779 done
10880}
0 commit comments