From ec0bdc245e5d50a8e397d98653169701a676971f Mon Sep 17 00:00:00 2001 From: th33xitus Date: Sun, 13 Nov 2022 15:19:39 +0100 Subject: [PATCH] fix(klipper): logic bug Signed-off-by: Dominik Willner --- scripts/klipper.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/klipper.sh b/scripts/klipper.sh index 066b9be..ea1579d 100644 --- a/scripts/klipper.sh +++ b/scripts/klipper.sh @@ -113,7 +113,7 @@ function start_klipper_setup() { fi ### user selection for setting the actual custom names - if [[ ${use_custom_names} == "true" ]]; then + if (( instance_count > 1 )) && [[ ${use_custom_names} == "true" ]]; then local i i=1 @@ -133,7 +133,7 @@ function start_klipper_setup() { error_msg "Invalid Input!\n" fi done && input="" - else + elif (( instance_count > 1 )) && [[ ${use_custom_names} == "false" ]]; then for (( i=1; i <= instance_count; i++ )); do instance_names+=("printer_${i}") done