From d1dff4d3b5e7036cf1fe0eb9b9241f70589dc748 Mon Sep 17 00:00:00 2001 From: th33xitus Date: Mon, 1 Feb 2021 20:48:05 +0100 Subject: [PATCH] fix: logic error in build+flash function --- scripts/install_klipper.sh | 2 ++ scripts/ui/advanced_menu.sh | 10 ++++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/scripts/install_klipper.sh b/scripts/install_klipper.sh index eb505f4..6e57932 100755 --- a/scripts/install_klipper.sh +++ b/scripts/install_klipper.sh @@ -254,10 +254,12 @@ flash_routine(){ case "$yn" in Y|y|Yes|yes|"") echo -e "###### > Yes" + FLASH_FIRMWARE="true" get_mcu_id break;; N|n|No|no) echo -e "###### > No" + FLASH_FIRMWARE="false" break;; *) print_unkown_cmd diff --git a/scripts/ui/advanced_menu.sh b/scripts/ui/advanced_menu.sh index 8fe288d..143ebce 100755 --- a/scripts/ui/advanced_menu.sh +++ b/scripts/ui/advanced_menu.sh @@ -40,10 +40,12 @@ advanced_menu(){ clear print_header flash_routine - ### build in a sleep to give the user a chance to have a look at the - ### MCU IDs before directly starting to build the klipper firmware - status_msg "Please wait..." && sleep 10 && build_fw - flash_mcu + if [ $FLASH_FIRMWARE = "true" ]; then + ### build in a sleep to give the user a chance to have a look at the + ### MCU IDs before directly starting to build the klipper firmware + status_msg "Please wait..." && sleep 10 && build_fw + flash_mcu + fi print_msg && clear_msg advanced_ui;; 5)