[Libreoffice-commits] .: Branch 'feature/rip-build-repo' - g

Jan Holesovsky kendy at kemper.freedesktop.org
Fri Nov 19 02:20:41 PST 2010


 g |   22 ++++++++++++----------
 1 file changed, 12 insertions(+), 10 deletions(-)

New commits:
commit ac1dc5dc88f965a051505c046e5a9d5ece224c81
Author: Jan Holesovsky <kendy at suse.cz>
Date:   Fri Nov 19 11:20:18 2010 +0100

    build: Fix ./g clone.

diff --git a/g b/g
index 7e3fd2a..e410422 100755
--- a/g
+++ b/g
@@ -117,10 +117,10 @@ if [ "$COMMAND" = "clone" ] ; then
           help impress libs-core libs-extern libs-extern-sys libs-gui
           postprocess sdk testing ure writer"
 fi
-for D in $DIRS ; do
-    DIR="$CLONEDIR/$D"
-    NAME="$D"
-    if [ "$D" = "bootstrap" ] ; then
+for REPO in $DIRS ; do
+    DIR="$CLONEDIR/$REPO"
+    NAME="$REPO"
+    if [ "$REPO" = "bootstrap" ] ; then
         DIR="$RAWBUILDDIR"
         NAME="main repo"
     fi
@@ -128,7 +128,11 @@ for D in $DIRS ; do
     if [ \( -d "$DIR" -a -d "$DIR"/.git \) -o \( "$COMMAND" = "clone" \) ] ; then
         (
             # executed in a subshell
-            [ "$COMMAND" != "clone" ] && cd "$DIR"
+            if [ "$COMMAND" != "clone" ] ; then
+                cd "$DIR"
+            else
+                cd "$CLONEDIR"
+            fi
 
             # relativize the absolutized params again if we want to operate
             # only on the files belonging to this exact repo
@@ -138,7 +142,7 @@ for D in $DIRS ; do
                 PWD=`pwd`
                 PWDLEN=`pwd | wc -c`
                 for I in "${FILES[@]}" ; do
-                    I="${I//@REPO@/${DIR}}"
+                    I="${I//@REPO@/${REPO}}"
                     unset FILES[$FILESNUM]
                     FILESNUM=$(($FILESNUM+1))
                     # filter out files that don't belong to this repo
@@ -183,9 +187,7 @@ for D in $DIRS ; do
                     fi
                     ;;
                 clone)
-                    if [ -z "$FILES" ]; then
-                        EXTRA="$(git config remote.origin.url|sed 's|/[^/]\+$||')/${DIR}"
-                    fi
+                    EXTRA="$(git config remote.origin.url|sed 's|/[^/]\+$||')/${REPO}"
                     ;;
             esac
 
@@ -211,7 +213,7 @@ for D in $DIRS ; do
                     for link in `ls` ; do
                         if [ ! -e "$RAWBUILDDIR/$link" ] ; then
                             echo "Creating missing link $link"
-                            ln -s "$CLONEDIR/$DIR/$link" "$RAWBUILDDIR/$link"
+                            ln -s "$DIR/$link" "$RAWBUILDDIR/$link"
                         fi
                     done
                     ;;


More information about the Libreoffice-commits mailing list