[gnome-shell] gnome-shell-build-setup.sh: install git-bz



commit 06e9bf9b0aa6c130e60dd78865773f94c5043608
Author: Owen W. Taylor <otaylor fishsoup net>
Date:   Wed Oct 3 00:03:14 2012 -0400

    gnome-shell-build-setup.sh: install git-bz
    
    Someone starting gnome-shell development work needs git-bz set up.
    Install it into the user account much like we install jhbuild.
    
    (Getting git-bz packaged into distributions would be better, but
    this improves thing easily.)
    
    https://bugzilla.gnome.org/show_bug.cgi?id=685354

 tools/build/gnome-shell-build-setup.sh |   48 ++++++++++++++++++++++---------
 1 files changed, 34 insertions(+), 14 deletions(-)
---
diff --git a/tools/build/gnome-shell-build-setup.sh b/tools/build/gnome-shell-build-setup.sh
index 203577a..e04f84d 100755
--- a/tools/build/gnome-shell-build-setup.sh
+++ b/tools/build/gnome-shell-build-setup.sh
@@ -246,22 +246,29 @@ if [ -d $SOURCE ] ; then : ; else
     echo "Created $SOURCE"
 fi
 
-if [ -d $SOURCE/jhbuild ] ; then
-    if [ -d $SOURCE/jhbuild/.git ] ; then
-        echo -n "Updating jhbuild ... "
-        ( cd $SOURCE/jhbuild && git pull --rebase > /dev/null ) || exit 1
-        echo "done"
+checkout_git() {
+    module=$1
+    source=$2
+
+    if [ -d $SOURCE/$1 ] ; then
+        if [ -d $SOURCE/$1/.git ] ; then
+            echo -n "Updating $1 ... "
+            ( cd $SOURCE/$1 && git pull --rebase > /dev/null ) || exit 1
+            echo "done"
+        else
+            echo "$SOURCE/$1 is not a git repository"
+            echo "You should remove it and rerun this script"
+            exit 1
+        fi
     else
-        echo "$SOURCE/jhbuild is not a git repository"
-        echo "You should remove it and rerun this script"
-	exit 1
+        echo -n "Checking out $1 into $SOURCE/$1 ... "
+        cd $SOURCE
+        git clone $2 > /dev/null || exit 1
+        echo "done"
     fi
-else
-    echo -n "Checking out jhbuild into $SOURCE/jhbuild ... "
-    cd $SOURCE
-    git clone git://git.gnome.org/jhbuild > /dev/null || exit 1
-    echo "done"
-fi
+}
+
+checkout_git jhbuild git://git.gnome.org/jhbuild
 
 echo -n "Installing jhbuild ... "
 (cd $SOURCE/jhbuild &&
@@ -294,4 +301,17 @@ if test "x`echo $PATH | grep $HOME/bin`" = x; then
     echo
 fi
 
+checkout_git git-bz git://git.fishsoup.net/git-bz
+
+
+echo -n "Installing git-bz ... "
+old="`readlink $HOME/bin/git-bz`"
+( cd $HOME/bin && ln -sf ../Source/git-bz/git-bz . )
+new="`readlink $HOME/bin/git-bz`"
+echo "done"
+
+if test "$old" != "$new" ; then
+    echo "WARNING: $HOME/bin/git-bz was changed from '$old' to '$new'"
+fi
+
 echo "Done."



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]