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>2007-01-21 13:47:53 (GMT)
committer Marco Pesenti Gritti <mpg@redhat.com>2007-01-21 13:47:53 (GMT)
commit3aeac4c6f6d03df3e86a7295064f80203368ed7c (patch)
treeb7cfe7c9685c653655f0422c39dbb72240aca7f4 /sugar-jhbuild
parentbb597352b2241211a758f735820cb054b3695373 (diff)
Add a sanitycheck command
Diffstat (limited to 'sugar-jhbuild')
-rwxr-xr-xsugar-jhbuild23
1 files changed, 13 insertions, 10 deletions
diff --git a/sugar-jhbuild b/sugar-jhbuild
index e9ded6a..4eb5223 100755
--- a/sugar-jhbuild
+++ b/sugar-jhbuild
@@ -13,20 +13,20 @@ 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)
-checker = DependencyChecker()
-checker.check_python('2.5')
-
-print 'Missing dependencies:'
-if len(checker.get_missing()) > 0:
- for missing in checker.get_missing():
- print missing
- sys.exit(1)
-
args = []
command = 'build'
@@ -36,4 +36,7 @@ if len(sys.argv) > 0:
if len(sys.argv) > 1:
args = sys.argv[2:]
-jhbuild.commands.run(command, config, args)
+if command == 'sanitycheck':
+ cmd_sanitycheck()
+else:
+ jhbuild.commands.run(command, config, args)