From: Simon Ruderich Date: Sat, 21 Feb 2009 01:02:54 +0000 (-0600) Subject: Find git directories in setup.sh automatically. X-Git-Url: https://ruderich.org/simon/gitweb/?a=commitdiff_plain;h=2c933f0815a27d1f67b60fd64ae88d5a6b0d542c;p=config%2Fdotfiles.git Find git directories in setup.sh automatically. --- diff --git a/setup.sh b/setup.sh index 98c9100..2f8472a 100755 --- a/setup.sh +++ b/setup.sh @@ -8,7 +8,10 @@ projects="browser lftp mail music os shell vcs vim" # Run setup.sh in each project. -for project in $projects; do +for project in `find . -name .git -type d`; do + # Skip this directory to prevent an infinite loop. + [ "$project" = "./.git" ] && continue + [ -d "$project" ] && (echo "running setup.sh in '$project'"; - cd "$project"; ./setup.sh > /dev/null) + cd "$project/.."; ./setup.sh > /dev/null) done