blob: f18592306703e498f1996968ae0a9fed65eed63c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
#!/usr/bin/env python
import os
import sys
import subprocess
base_dir = os.path.abspath(os.path.dirname(__file__))
jhbuild_dir = os.path.join(base_dir, 'jhbuild')
sys.path.append(os.path.join(base_dir, 'scripts'))
sys.path.append(jhbuild_dir)
args = sys.argv[1:]
if os.path.exists(jhbuild_dir):
if not args or 'build' in args or 'update' in args:
print 'Updating sugar-jhbuild...'
retcode = subprocess.call(['git', 'pull'])
if retcode:
print 'Failed to update sugar-jhbuild.'
cwd = os.getcwd()
os.chdir(jhbuild_dir)
retcode = subprocess.call(['git', 'pull'])
if retcode:
print 'Failed to update 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 'Failed to clone sugar-jhbuild.'
os.chdir(cwd)
import main
sys.exit(main.main(sys.argv[1:]))
|