Use mapfile

Signed-off-by: Christian König <ckoenig@posteo.de>
This commit is contained in:
Christian König 2023-05-05 14:51:06 +02:00
parent d9e4e1111f
commit a023195c4d
No known key found for this signature in database

View file

@ -199,7 +199,7 @@ checkout() {
echo -e "${OVER} ${CROSS} $str" echo -e "${OVER} ${CROSS} $str"
exit 1 exit 1
fi fi
corerefs=("$(get_available_refs "${PI_HOLE_FILES_DIR}")") mapfile -t corerefs < <(get_available_refs "${PI_HOLE_FILES_DIR}")
if [[ "${corerefs[*]}" == *"master"* ]]; then if [[ "${corerefs[*]}" == *"master"* ]]; then
echo -e "${OVER} ${TICK} $str" echo -e "${OVER} ${TICK} $str"
@ -226,7 +226,7 @@ checkout() {
echo -e "${OVER} ${CROSS} $str" echo -e "${OVER} ${CROSS} $str"
exit 1 exit 1
fi fi
webrefs=("$(get_available_refs "${webInterfaceDir}")") mapfile -t webrefs < <(get_available_refs "${webInterfaceDir}")
if [[ "${webrefs[*]}" == *"master"* ]]; then if [[ "${webrefs[*]}" == *"master"* ]]; then
echo -e "${OVER} ${TICK} $str" echo -e "${OVER} ${TICK} $str"