[Libreoffice-commits] .: 2 commits - bin/unpack

Miklos Vajna vmiklos at kemper.freedesktop.org
Tue Nov 9 16:16:33 PST 2010


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

New commits:
commit c0ae59813883cde76df39a58cfe294cb9f0e2a3e
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 a8810c6..aaf877d 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 f72e7710b854643f89066a936fa95ce2f65bc78f
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 e87e8f7..a8810c6 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