Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/sugar-jhbuild
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <mpg@redhat.com>2008-04-20 00:36:11 (GMT)
committer Marco Pesenti Gritti <mpg@redhat.com>2008-04-20 00:36:11 (GMT)
commit9f2bbbbebfa7b6f2de89520c6f591549d1ae2667 (patch)
treeba044b3760c3ebe249636e6fa51462fee5b008f2 /sugar-jhbuild
parent9dfe3519d60e27afa20e129d2c87e8f11a1b533c (diff)
Pull jhbuild instead of using an internal copy.
Directory structure cleanups.
Diffstat (limited to 'sugar-jhbuild')
-rwxr-xr-xsugar-jhbuild31
1 files changed, 25 insertions, 6 deletions
diff --git a/sugar-jhbuild b/sugar-jhbuild
index 0f1154c..445ee8f 100755
--- a/sugar-jhbuild
+++ b/sugar-jhbuild
@@ -5,14 +5,33 @@ import sys
import subprocess
base_dir = os.path.abspath(os.path.dirname(__file__))
-sys.path.append(os.path.join(base_dir, 'build-scripts', 'jhbuild'))
+jhbuild_dir = os.path.join(base_dir, 'jhbuild')
-# The update needs to be very early, before we load any module
-if len(sys.argv) == 1 or (len(sys.argv) > 1 and sys.argv[1] == 'build'):
- print 'Updating sugar-jhbuild...'
- retcode = subprocess.call(['git', 'pull'])
+sys.path.append(os.path.join(base_dir, 'scripts'))
+sys.path.append(jhbuild_dir)
+
+if os.path.exists(jhbuild_dir):
+ if len(sys.argv) == 1 or (len(sys.argv) > 1 and sys.argv[1] == 'build'):
+ print 'Updating sugar-jhbuild...'
+
+ cwd = os.getcwd()
+ os.chdir(jhbuild_dir)
+
+ retcode = subprocess.call(['git', 'pull'])
+ if retcode:
+ print 'Failed to update sugar-jhbuild.'
+
+ os.chdir(cwd)
+else:
+ cwd = os.getcwd()
+ os.chdir(base_dir)
+
+ jhbuild_repo = 'git://dev.laptop.org/users/marco/jhbuild'
+ retcode = subprocess.call(['git', 'clone', jhbuild_repo])
if retcode:
- print 'sugar-jhbuild update failed.'
+ print 'Failed to clone sugar-jhbuild.'
+
+ os.chdir(cwd)
import main