1
0
mirror of https://github.com/pi-hole/pi-hole synced 2025-01-09 15:40:54 +00:00

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"
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"