X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=setup.sh;h=ce478023a6d298ead5f8077725dbf9ee91f5c42a;hb=224cc5ab9e3d52a8753d3a23ca2b45988a0785c4;hp=81df8b190136d59898ce37cf203d36c54e93e86d;hpb=1384fc92cc646c4fa666819682ff288d572641ab;p=config%2Fdotfiles.git diff --git a/setup.sh b/setup.sh index 81df8b1..ce47802 100755 --- a/setup.sh +++ b/setup.sh @@ -19,16 +19,17 @@ # along with this program. If not, see . -set -e +set -eu -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$||'` + project=`printf '%s' "$path" | sed 's|/setup.sh$||'` - echo "running setup.sh in '$project'" - ( cd "$project"; ./setup.sh > /dev/null ) + printf "running setup.sh in '%s'\n" "$project" + ( cd "$project" && ./setup.sh >/dev/null ) || { + printf '%s/setup.sh failed\n' "$project" >&2 + exit 1 + } done