replace readarray with read
This commit is contained in:
parent
7288faf9da
commit
8a340366bf
1 changed files with 3 additions and 1 deletions
4
gis
4
gis
|
|
@ -89,7 +89,9 @@ fi
|
||||||
# Find Git repositories
|
# Find Git repositories
|
||||||
git_dirs=()
|
git_dirs=()
|
||||||
for path in "${paths[@]}"; do
|
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
|
# Check if inside of a repository if none found
|
||||||
if [ "${#found_git_dirs[@]}" -eq 0 ]; then
|
if [ "${#found_git_dirs[@]}" -eq 0 ]; then
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue