]> ruderich.org/simon Gitweb - config/dotfiles.git/commitdiff
setup.sh: Cleanup.
authorSimon Ruderich <simon@ruderich.org>
Sun, 10 Mar 2013 21:49:16 +0000 (22:49 +0100)
committerSimon Ruderich <simon@ruderich.org>
Sun, 10 Mar 2013 21:49:16 +0000 (22:49 +0100)
setup.sh

index 81df8b190136d59898ce37cf203d36c54e93e86d..e16c7772e4574314874e7f4c78739ccc81639892 100755 (executable)
--- a/setup.sh
+++ b/setup.sh
 
 set -e
 
-for path in `find . -name setup.sh -type f`; do
-    # Skip this directory to prevent an infinite loop.
-    [ "$path" = "./setup.sh" ] && continue
+for path in */setup.sh; do
     # Skip non executable setup.sh files as an easy way to deactivate one.
-    [ ! -x "$path" ] && continue
+    test ! -x "$path" && continue
 
     project=`echo "$path" | sed 's|/setup.sh$||'`
 
     echo "running setup.sh in '$project'"
-    ( cd "$project"; ./setup.sh > /dev/null )
+    ( cd "$project"; ./setup.sh >/dev/null )
 done