From 27b1e88d06e5ed69b86ff705c10c2c8fe67b1cd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 5 Apr 2012 18:47:33 +0200 Subject: Update update-common script to work with branch master too --- update-common | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'update-common') diff --git a/update-common b/update-common index b7eb537..e3b95e4 100755 --- a/update-common +++ b/update-common @@ -52,12 +52,21 @@ do continue; fi - git checkout -b $BRANCH origin/$BRANCH + if test $BRANCH = 'master'; then + git checkout $BRANCH + else + git checkout -b $BRANCH origin/$BRANCH + fi + git submodule init git submodule update cd $dir/$module/common ref_from=`git log --pretty=format:%h -n 1 HEAD` - git checkout -b $BRANCH origin/$BRANCH + if test $BRANCH = 'master'; then + git checkout $BRANCH + else + git checkout -b $BRANCH origin/$BRANCH + fi git pull origin ref_to=`git log --pretty=format:%h -n 1 HEAD` echo updating common from $ref_from to $ref_to -- cgit v1.2.1