replace readarray with read

This commit is contained in:
Denis Lehmann 2023-10-22 12:33:21 +02:00
parent 7288faf9da
commit 8a340366bf

4
gis
View file

@ -89,7 +89,9 @@ fi
# Find Git repositories
git_dirs=()
for path in "${paths[@]}"; do
readarray -t found_git_dirs < <(find "$path" -type d -name ".git" -exec dirname {} \; | sort)
OLDIFS=$IFS
IFS=$'\n' read -r -d '' -a found_git_dirs < <(find "$path" -type d -name ".git" -exec dirname {} \; | sort)
IFS=$OLDIFS
# Check if inside of a repository if none found
if [ "${#found_git_dirs[@]}" -eq 0 ]; then