Find .git directories, not files

This commit is contained in:
Oliver Davies 2024-06-25 07:04:06 +01:00
parent 3092cafb20
commit 055b1583db

View file

@ -6,7 +6,7 @@
set -o errexit
set -o nounset
dirs=$(find ~/Code/personal ~/Code/work -mindepth 1 -maxdepth 2 -type f -name .git -not -path '*/*.old/*')
dirs=$(find ~/Code/personal ~/Code/work -mindepth 1 -maxdepth 2 -type d -name .git -not -path '*/*.old/*')
for dir in $dirs; do
repo_path="${dir%/.git}"