--- /dev/null
+#!/bin/sh
+
+# Update all git repositories to the latest available changes. This should be
+# run on remote servers after new commits where pushed to them.
+
+
+pwd=`pwd`
+for path in `find . -name .git -type d`; do
+ cd $path; cd ..
+
+ # Merge all branches into master if it's checked out. Then run ./setup.sh
+ # to make sure all configuration files get updated.
+ if `git branch | grep *\ master > /dev/null`; then
+ echo $path:
+ for branch in `git branch -a | grep remotes`; do
+ echo " merging: $branch"
+ git merge $branch
+ done
+ echo " running ./setup.sh"
+ ./setup.sh > /dev/null || exit 1
+ fi
+
+ cd $pwd
+done