[Libreoffice-commits] .: Branch 'libreoffice-3-3' - 2 commits - bin/unpack

Miklos Vajna vmiklos at kemper.freedesktop.org
Tue Nov 9 04:59:39 PST 2010


 bin/unpack |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit d634b372341f197288111a843e75f0a724604e1e
Author: Miklos Vajna <vmiklos at frugalware.org>
Date:   Mon Nov 8 21:36:10 2010 +0100

    unpack: don't warn on master branch
    
    Don't check if the 'master' branch of the repos is checked out, check if
    the branch is the same as the branch of the parent repo.

diff --git a/bin/unpack b/bin/unpack
index 933191b..553180d 100755
--- a/bin/unpack
+++ b/bin/unpack
@@ -42,9 +42,10 @@ check_git_repo()
 {
     tree="$CLONEDIR/$1"
     $echo_n "Checking for current branch of $tree ... $echo_c";
+    BUILD_BRANCH=`git symbolic-ref HEAD|sed 's|.*/||'`
     if cd "$tree" >/dev/null 2>&1 ; then
         CURRENT_BRANCH=`git symbolic-ref HEAD|sed 's|.*/||'`
-        if test "$CURRENT_BRANCH" = "master"; then
+        if test "$CURRENT_BRANCH" = "$BUILD_BRANCH"; then
             echo "ok"
         else
             echo "warning, current branch is $CURRENT_BRANCH"
commit 1b05d232cc0af5bffb59c8612bb2e8e6809e767b
Author: Miklos Vajna <vmiklos at frugalware.org>
Date:   Mon Nov 8 21:34:08 2010 +0100

    unpack: avoid using git-branch
    
    git-branch is porcelain, use plumbing commands instead.

diff --git a/bin/unpack b/bin/unpack
index 135a33a..933191b 100755
--- a/bin/unpack
+++ b/bin/unpack
@@ -43,12 +43,11 @@ check_git_repo()
     tree="$CLONEDIR/$1"
     $echo_n "Checking for current branch of $tree ... $echo_c";
     if cd "$tree" >/dev/null 2>&1 ; then
-	IS_MASTER=`git branch | grep '^\* master$'`
-        if test -n "$IS_MASTER" ; then
+        CURRENT_BRANCH=`git symbolic-ref HEAD|sed 's|.*/||'`
+        if test "$CURRENT_BRANCH" = "master"; then
             echo "ok"
         else
-            $echo_n "warning, current branch is "
-	    git branch | grep '^\*' | sed 's/^.//'
+            echo "warning, current branch is $CURRENT_BRANCH"
         fi
     else
         echo "missing the $tree clone; run './download'"


More information about the Libreoffice-commits mailing list