X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=setup.sh;h=2f392458c92a8324143fd2222799fb84e0bc836a;hb=c0ae7152026890b30acaa87498e3950b2ad1164e;hp=0f263293d4a12e48a87a1867376afe3f4e164787;hpb=35b924d46fd7056f0ec62b1669b1d8c0b57da3f6;p=config%2Fdotfiles.git diff --git a/setup.sh b/setup.sh index 0f26329..d2a3815 100755 --- a/setup.sh +++ b/setup.sh @@ -1,8 +1,9 @@ #!/bin/sh -# Setup script for miscellaneous configuration files. +# Runs setup.sh in all configuration directories. Must be run in the main +# configuration directory. -# Copyright (C) 2011-2012 Simon Ruderich +# Copyright (C) 2009-2018 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 @@ -18,13 +19,17 @@ # along with this program. If not, see . -. ../lib.sh +set -eu -# gdb, gnu debugger. -link gdbinit ~/.gdbinit +for path in */setup.sh; do + # Skip non executable setup.sh files as an easy way to deactivate one. + test ! -x "$path" && continue -# Maxima, a symbolic algebra program. -link maxima ~/.maxima + project=`printf '%s' "$path" | sed 's|/setup.sh$||'` -# perlcritic to check Perl programs for common problems. -link perl/perlcriticrc ~/.perlcriticrc + 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