From 3aeac4c6f6d03df3e86a7295064f80203368ed7c Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Sun, 21 Jan 2007 13:47:53 +0000 Subject: Add a sanitycheck command --- (limited to 'sugar-jhbuild') 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) -- cgit v0.9.1