Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/sugar-jhbuild
blob: 4eb522356e4c555a599a18e2b499fc238c45b1e6 (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
#!/usr/bin/env python

import os
import sys

base_dir = os.path.abspath(os.path.dirname(__file__))
sys.path.append(os.path.join(base_dir, 'build-scripts', 'jhbuild'))

import jhbuild.commands

import bundlemodule
from config import Config
from updater import Updater
from dependencychecker import DependencyChecker

def cmd_sanitycheck():
    checker = DependencyChecker()
    checker.check_python('2.5')

    print 'Missing dependencies:'
    if len(checker.get_missing()) > 0:
        for missing in checker.get_missing():
            print missing

updater = Updater(base_dir)
updater.update()

config = Config(base_dir)

args = []
command = 'build'

if len(sys.argv) > 0:
    command = sys.argv[1]

if len(sys.argv) > 1:
	args = sys.argv[2:]

if command == 'sanitycheck':
    cmd_sanitycheck()
else:
    jhbuild.commands.run(command, config, args)