X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=setup.sh;h=cf7eb54fe5cf5afe3ab45b405754f0202d000909;hb=a82683769e49aba668f48c8cbe6d8efd9d940b4b;hp=98c910064a03178666d3762a1cc336c9637e5a1f;hpb=57f91f13e3284a37c0f5aa88de451f1618fdd11e;p=config%2Fdotfiles.git diff --git a/setup.sh b/setup.sh index 98c9100..cf7eb54 100755 --- a/setup.sh +++ b/setup.sh @@ -3,12 +3,35 @@ # Runs setup.sh in all configuration directories. Must be run in the main # configuration directory. +# Copyright (C) 2009-2013 Simon Ruderich +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . -# Projects which use git. -projects="browser lftp mail music os shell vcs vim" -# Run setup.sh in each project. -for project in $projects; do - [ -d "$project" ] && (echo "running setup.sh in '$project'"; - cd "$project"; ./setup.sh > /dev/null) +set -e + +for path in */setup.sh; do + # Skip non executable setup.sh files as an easy way to deactivate one. + test ! -x "$path" && continue + + project=`echo "$path" | sed 's|/setup.sh$||'` + + echo "running setup.sh in '$project'" + if ( cd "$project"; ./setup.sh >/dev/null ); then + : + else + echo "$project/setup.sh failed" >&2 + exit 1 + fi done