3 # Update all current projects hooks and config
5 # If one or more project names are given, just update those instead
7 # update-all-projects [--dry-run] [projname]...
15 [ "$1" != "--force" ] && [ "$1" != "-f" ] ||
{ force
=1; shift; }
16 [ "$1" != "--dry-run" ] && [ "$1" != "-n" ] ||
{ dryrun
=1; shift; }
17 case "$1" in -*) echo "Invalid options: $1" >&2; exit 1;; esac
21 if [ -z "$cfg_owning_group" ]; then
22 if [ -z "$force" ]; then
23 echo "No owning_group set, refusing to run without --force" >&2
28 mydir
="$(cd "$
(dirname "$0")" && pwd -P)"
29 required
='update-all-hooks.sh update-all-config.pl'
31 for r
in $required; do
32 if ! [ -x "$mydir/$r" ]; then
33 echo "missing required script: $mydir/$r" >&2
37 [ -z "$bad" ] ||
exit 1
38 echo "Running update-all-hooks..."
39 "$mydir/update-all-hooks.pl" ${force:+--force} ${dryrun:+--dry-run} "$@"
40 echo "Running update-all-config..."
41 "$mydir/update-all-config.pl" ${force:+--force} ${dryrun:+--dry-run} "$@"