From 40745e90df9f3339a869bed78d1f6e68ffd51fe1 Mon Sep 17 00:00:00 2001 From: th33xitus Date: Thu, 23 Dec 2021 14:19:06 +0100 Subject: [PATCH] refactor: move $INSTANCE_COUNT into setup function --- scripts/install_moonraker.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/install_moonraker.sh b/scripts/install_moonraker.sh index 8e4616f..7877ec1 100755 --- a/scripts/install_moonraker.sh +++ b/scripts/install_moonraker.sh @@ -66,13 +66,12 @@ moonraker_setup_dialog(){ warn_msg "Invalid Input!\n" else echo - INSTANCE_COUNT=$count - read -p "${cyan}###### Install $INSTANCE_COUNT instance(s)? (Y/n):${default} " yn + read -p "${cyan}###### Install $count instance(s)? (Y/n):${default} " yn case "$yn" in Y|y|Yes|yes|"") echo -e "###### > Yes" status_msg "Installing Moonraker ...\n" - moonraker_setup + moonraker_setup "$count" break;; N|n|No|no) echo -e "###### > No" @@ -87,6 +86,7 @@ moonraker_setup_dialog(){ } moonraker_setup(){ + INSTANCE_COUNT=$1 ### checking dependencies dep=(wget curl unzip dfu-util virtualenv) ### additional deps for kiauh compatibility for armbian