From dfe359e34aadd34f25c570b9ff9e835c65930a18 Mon Sep 17 00:00:00 2001 From: Heavybullets8 Date: Wed, 27 Jul 2022 10:31:43 -0600 Subject: [PATCH] silencing shellcheck --- functions/mount.sh | 2 +- functions/update_apps.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/functions/mount.sh b/functions/mount.sh index 88d9af21..b7576ca9 100644 --- a/functions/mount.sh +++ b/functions/mount.sh @@ -39,7 +39,7 @@ if [[ $selection == "1" ]]; then exit elif [[ $selection == "2" ]]; then mapfile -t unmount_array < <(basename -a /mnt/heavyscript/* | sed "s/*//") - [[ -z $unmount_array ]] && echo "Theres nothing to unmount" && exit + [[ -z ${unmount_array[*]} ]] && echo "Theres nothing to unmount" && exit for i in "${unmount_array[@]}" do main=$(k3s kubectl get pvc -A | grep -E "\s$i\s" | awk '{print $1, $2, $4}') diff --git a/functions/update_apps.sh b/functions/update_apps.sh index 6fe1e875..64104df1 100644 --- a/functions/update_apps.sh +++ b/functions/update_apps.sh @@ -5,7 +5,7 @@ commander(){ mapfile -t array < <(cli -m csv -c 'app chart_release query name,update_available,human_version,human_latest_version,container_images_update_available,status' | tr -d " \t\r" | grep -E ",true($|,)" | sort) echo -e "\n\nAplication Update Output" echo "------------------------" -[[ -z $array ]] && echo "There are no updates available" && return 0 || echo "${#array[@]} update(s) available" +[[ -z ${array[*]} ]] && echo "There are no updates available" && return 0 || echo "${#array[@]} update(s) available" [[ -z $timeout ]] && echo "Default Timeout: 500" && timeout=500 || echo "Custom Timeout: $timeout" [[ "$timeout" -le 120 ]] && echo "Warning: Your timeout is set low and may lead to premature rollbacks or skips" echo "Asynchronous Updates: $update_limit"