]> ruderich.org/simon Gitweb - config/dotfiles.git/blobdiff - setup.sh
lib.sh: Add perl support to generate().
[config/dotfiles.git] / setup.sh
index 50df24d8ccc5223a5adb6f80b58f6641cc7abc86..6e5a69ae0b71c3fe3801fff8e8df89140be76e2d 100755 (executable)
--- a/setup.sh
+++ b/setup.sh
@@ -57,12 +57,14 @@ git_remote_init_update() {
 
 # Run setup.sh in each project.
 if [ "$#" -eq "0" ]; then
-    for project in `find . -name .git -type d`; do
+    for path in `find . -name setup.sh -type f -executable`; do
         # Skip this directory to prevent an infinite loop.
-        [ "$project" = "./.git" ] && continue
+        [ "$path" = "./setup.sh" ] && continue
 
-        [ -d "$project" ] && (echo "running setup.sh in '$project'";
-                            cd "$project/.."; ./setup.sh > /dev/null)
+        project=`echo "$path" | sed 's|/setup.sh$||'`
+
+        echo "running setup.sh in '$project'"
+        ( cd "$project"; ./setup.sh > /dev/null )
     done
 # Create git repository if necessary and/or additional remotes and fetch them.
 elif [ "$#" -ge "2" ]; then