From 985825455031c54c78efd9e71c54833a6886a25d Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Thu, 23 Feb 2017 06:42:20 +0200 Subject: Add script to update branches from master. --- helpers/ChangeLog | 4 ++++ helpers/update-branches.sh | 19 +++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100755 helpers/update-branches.sh (limited to 'helpers') diff --git a/helpers/ChangeLog b/helpers/ChangeLog index d29071e3..a3d6815c 100644 --- a/helpers/ChangeLog +++ b/helpers/ChangeLog @@ -1,3 +1,7 @@ +2017-02-23 Arnold D. Robbins + + * update-branches.sh: New file. + 2016-10-23 Arnold D. Robbins * General: Remove trailing whitespace from all relevant files. diff --git a/helpers/update-branches.sh b/helpers/update-branches.sh new file mode 100755 index 00000000..659da8b8 --- /dev/null +++ b/helpers/update-branches.sh @@ -0,0 +1,19 @@ +#! /bin/sh + +if [ ! -d .git ] +then + echo you must run this script from the top level directory + exit 1 +fi + +git checkout master || exit + +features=$(git branch -a | grep /origin/feature/ | sed 's;.*/origin/;;') +others="porting" + +for i in $others $features +do + (git checkout $i && git pull && git merge master && git push) || break +done + +git checkout master || exit -- cgit v1.2.3