From 5e5cf75a2f998b6183c6c18a27b9022fc6d8de5e Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Wed, 31 Mar 2010 00:23:18 +0200 Subject: [PATCH] update.sh: Add, updates git repositories. --- update.sh | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 update.sh diff --git a/update.sh b/update.sh new file mode 100755 index 0000000..d6a1b4d --- /dev/null +++ b/update.sh @@ -0,0 +1,24 @@ +#!/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 -- 2.45.2