From a023195c4d4edbb5fc457b1d4c6bfe9d7eddce3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6nig?= Date: Fri, 5 May 2023 14:51:06 +0200 Subject: [PATCH] Use mapfile MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christian König --- advanced/Scripts/piholeCheckout.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/advanced/Scripts/piholeCheckout.sh b/advanced/Scripts/piholeCheckout.sh index 82ef374a..550262f7 100755 --- a/advanced/Scripts/piholeCheckout.sh +++ b/advanced/Scripts/piholeCheckout.sh @@ -199,7 +199,7 @@ checkout() { echo -e "${OVER} ${CROSS} $str" exit 1 fi - corerefs=("$(get_available_refs "${PI_HOLE_FILES_DIR}")") + mapfile -t corerefs < <(get_available_refs "${PI_HOLE_FILES_DIR}") if [[ "${corerefs[*]}" == *"master"* ]]; then echo -e "${OVER} ${TICK} $str" @@ -226,7 +226,7 @@ checkout() { echo -e "${OVER} ${CROSS} $str" exit 1 fi - webrefs=("$(get_available_refs "${webInterfaceDir}")") + mapfile -t webrefs < <(get_available_refs "${webInterfaceDir}") if [[ "${webrefs[*]}" == *"master"* ]]; then echo -e "${OVER} ${TICK} $str"