diff --git a/scripts/flash_klipper.sh b/scripts/flash_klipper.sh index bcb88d7..be92d6a 100644 --- a/scripts/flash_klipper.sh +++ b/scripts/flash_klipper.sh @@ -269,7 +269,7 @@ function build_fw(){ else cd "${KLIPPER_DIR}" status_msg "Initializing firmware build ..." - dep=(build-essential dpkg-dev make) + local dep=(build-essential dpkg-dev make) dependency_check "${dep[@]}" make clean && make menuconfig diff --git a/scripts/moonraker.sh b/scripts/moonraker.sh index 75fb5ea..5272ff3 100644 --- a/scripts/moonraker.sh +++ b/scripts/moonraker.sh @@ -114,7 +114,7 @@ function create_moonraker_virtualenv(){ function moonraker_setup(){ local confirm_msg instances=${1} ### checking dependencies - dep=(git wget curl unzip dfu-util virtualenv) + local dep=(git wget curl unzip dfu-util virtualenv) ### additional required dependencies on armbian dep+=(libjpeg-dev zlib1g-dev) dependency_check "${dep[@]}" diff --git a/scripts/nginx.sh b/scripts/nginx.sh index 5998680..b06f7aa 100644 --- a/scripts/nginx.sh +++ b/scripts/nginx.sh @@ -248,7 +248,7 @@ function set_nginx_cfg(){ if [ "${SET_NGINX_CFG}" = "true" ]; then local cfg="${SRCDIR}/kiauh/resources/${1}" #check for dependencies - dep=(nginx) + local dep=(nginx) dependency_check "${dep[@]}" #execute operations status_msg "Creating Nginx configuration for ${1} ..." diff --git a/scripts/octoprint.sh b/scripts/octoprint.sh index 042b8fd..dd84ed8 100644 --- a/scripts/octoprint.sh +++ b/scripts/octoprint.sh @@ -68,7 +68,7 @@ function octoprint_setup_dialog(){ function octoprint_setup(){ local instances="${1}" ### check and install all dependencies - dep=( + local dep=( git wget python3-pip diff --git a/scripts/pretty_gcode.sh b/scripts/pretty_gcode.sh index 341fb55..a2fffbe 100644 --- a/scripts/pretty_gcode.sh +++ b/scripts/pretty_gcode.sh @@ -26,8 +26,8 @@ function install_pgc_for_klipper(){ echo -e "${cyan}\n###### On which port should PrettyGCode run? (Default: ${pgc_default_port})${white} " read -e -p "${cyan}###### Port:${white} " -i "${pgc_default_port}" pgc_custom_port ### check nginx dependency - dep=(nginx) - dependency_check + local dep=(nginx) + dependency_check "${dep[@]}" ### clone repo [ -d "${PGC_DIR}" ] && rm -rf "${PGC_DIR}" cd "${HOME}" && git clone "${PGC_FOR_KLIPPER_REPO}" diff --git a/scripts/utilities.sh b/scripts/utilities.sh index 0a1bb5b..f0a324f 100644 --- a/scripts/utilities.sh +++ b/scripts/utilities.sh @@ -577,7 +577,7 @@ function change_hostname(){ function set_hostname(){ local new_hostname=${1} current_date #check for dependencies - dep=(avahi-daemon) + local dep=(avahi-daemon) dependency_check "${dep[@]}" #create host file if missing or create backup of existing one with current date&time