X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=setup.sh;h=8ef33df7544f137ea83635f302d480be02a078a8;hb=16b3c2e4f69bd40528175bd2949f98ff65c7adbd;hp=74da7c167cf08c0a2c749730134b2a39df1b7ba2;hpb=d4c457c604ae65ee454d8c7464ff4a49211c483f;p=config%2Fdotfiles.git diff --git a/setup.sh b/setup.sh index 74da7c1..8ef33df 100755 --- a/setup.sh +++ b/setup.sh @@ -57,12 +57,16 @@ 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`; do # Skip this directory to prevent an infinite loop. - [ "$project" = "./.git" ] && continue + [ "$path" = "./setup.sh" ] && continue + # Skip non executable setup.sh files as an easy way to deactivate one. + [ ! -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 # Create git repository if necessary and/or additional remotes and fetch them. elif [ "$#" -ge "2" ]; then