[Libreoffice-commits] .: bin/g
Jan Holesovsky
kendy at kemper.freedesktop.org
Tue Nov 9 03:41:47 PST 2010
bin/g | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
New commits:
commit dd14f0d9bf4c1a8b1f06916391b146c2c0bf2085
Author: Jan Holesovsky <kendy at suse.cz>
Date: Tue Nov 9 12:39:10 2010 +0100
Add the possibility to use 'bin/g clone' to get the clone of the repos.
diff --git a/bin/g b/bin/g
index b1c80fc..347522d 100755
--- a/bin/g
+++ b/bin/g
@@ -72,6 +72,7 @@ while shift ; do
continue
elif [ "${PARAM:0:1}" = "-" ] ; then
if [ \( "$COMMAND" = "checkout" -a "$PARAM" = "-b" \) -o \
+ \( "$COMMAND" = "clone" -a "$PARAM" = "--reference" \) -o \
\( "$COMMAND" = "commit" -a "$PARAM" = "-m" \) -o \
\( "$COMMAND" = "commit" -a "$PARAM" = "-am" \) -o \
\( "$COMMAND" = "tag" -a "$PARAM" = "-m" \) ]
@@ -111,11 +112,17 @@ done
# do it!
cd "$CLONEDIR"
-for DIR in * ; do
- if [ -d "$DIR" -a -d "$DIR"/.git ] ; then
+DIRS=`ls`
+if [ "$COMMAND" = "clone" ] ; then
+ DIRS="artwork base bootstrap calc components extensions extras filters
+ help impress libs-core libs-extern libs-extern-sys libs-gui
+ postprocess sdk testing ure writer"
+fi
+for DIR in $DIRS ; do
+ if [ \( -d "$DIR" -a -d "$DIR"/.git \) -o \( "$COMMAND" = "clone" \) ] ; then
(
# executed in a subshell
- cd $DIR
+ [ "$COMMAND" != "clone" ] && cd $DIR
# relativize the absolutized params again if we want to operate
# only on the files belonging to this exact repo
@@ -125,11 +132,11 @@ for DIR in * ; do
PWD=`pwd`
PWDLEN=`pwd | wc -c`
for I in "${FILES[@]}" ; do
- I="${I//@REPO@/${DIR}}"
+ I="${I//@REPO@/${DIR}}"
unset FILES[$FILESNUM]
FILESNUM=$(($FILESNUM+1))
# filter out files that don't belong to this repo
- if [ "${I:0:1}" = "/" ] ; then
+ if [ \( "${I:0:1}" = "/" \) -a \( "$COMMAND" != "clone" \) ] ; then
if [ "${I:0:$PWDLEN}" = "$PWD/" ] ; then
FILES[$INSERTNUM]="${I:$PWDLEN}"
INSERTNUM=$(($INSERTNUM+1))
More information about the Libreoffice-commits
mailing list