Small fixes/tweaks

This commit is contained in:
th33xitus
2020-07-15 21:50:40 +02:00
parent 45fe688f87
commit 182164af9c
3 changed files with 8 additions and 4 deletions

View File

@@ -52,6 +52,7 @@ OCTOPRINT_CFG_DIR=${HOME}/.octoprint
OCTOPRINT_SERVICE1=/etc/init.d/octoprint OCTOPRINT_SERVICE1=/etc/init.d/octoprint
OCTOPRINT_SERVICE2=/etc/default/octoprint OCTOPRINT_SERVICE2=/etc/default/octoprint
#misc #misc
INI_DIR=${HOME}/kiauh/kiauh.ini
BACKUP_DIR=${HOME}/kiauh-backups BACKUP_DIR=${HOME}/kiauh-backups
PRINTER_CFG=${HOME}/printer.cfg PRINTER_CFG=${HOME}/printer.cfg
@@ -182,6 +183,7 @@ install_menu(){
update_menu(){ update_menu(){
print_header print_header
print_msg && CONFIRM_MSG="" && ERROR_MSG=""
read_bb4u_stat read_bb4u_stat
#compare versions #compare versions
ui_print_versions ui_print_versions

View File

@@ -24,12 +24,14 @@ read_bb4u_stat(){
toggle_backups(){ toggle_backups(){
source_ini source_ini
if [ "$backup_before_update" = "true" ]; then if [ "$backup_before_update" = "true" ]; then
sed -i '/backup_before_update=/s/true/false/' ${HOME}/kiauh2/kiauh.ini sed -i '/backup_before_update=/s/true/false/' $INI_DIR
BB4U_STATUS="${green}[Enable]${default} backups before updating " BB4U_STATUS="${green}[Enable]${default} backups before updating "
CONFIRM_MSG=" Backups before updates are now >>> DISABLED <<< !"
fi fi
if [ "$backup_before_update" = "false" ]; then if [ "$backup_before_update" = "false" ]; then
sed -i '/backup_before_update=/s/false/true/' ${HOME}/kiauh2/kiauh.ini sed -i '/backup_before_update=/s/false/true/' $INI_DIR
BB4U_STATUS="${red}[Disable]${default} backups before updating " BB4U_STATUS="${red}[Disable]${default} backups before updating "
CONFIRM_MSG=" Backups before updates are now >>> ENABLED <<< !"
fi fi
} }

View File

@@ -64,9 +64,9 @@ update_ui(){
top_border top_border
echo -e "| $(title_msg "~~~~~~~~~~~~~~ [ Update Menu ] ~~~~~~~~~~~~~~") | " echo -e "| $(title_msg "~~~~~~~~~~~~~~ [ Update Menu ] ~~~~~~~~~~~~~~") | "
hr hr
echo -e "| It's a good idea to check the following website | " echo -e "| It is a good idea to check the following website | "
echo -e "| for important software changes to the config file | " echo -e "| for important software changes to the config file | "
echo -e "| BEFORE updating your klipper installation: | " echo -e "| >> BEFORE << updating your klipper installation: | "
echo -e "| | " echo -e "| | "
echo -e "| ${yellow}https://www.klipper3d.org/Config_Changes.html${default} | " echo -e "| ${yellow}https://www.klipper3d.org/Config_Changes.html${default} | "
bottom_border bottom_border