From d1bf7ae5c950b5d54ce34dd416f7f53aeb9e92f8 Mon Sep 17 00:00:00 2001 From: Jean-Paul Chaput Date: Fri, 19 Mar 2010 10:05:30 +0000 Subject: [PATCH] Add a "quiet" mode. --- bootstrap/buildCoriolis.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/bootstrap/buildCoriolis.py b/bootstrap/buildCoriolis.py index 437d326d..4bd838b4 100755 --- a/bootstrap/buildCoriolis.py +++ b/bootstrap/buildCoriolis.py @@ -54,6 +54,7 @@ class ProjectBuilder: self._standalones = [] self._svnTag = "x" self._rootDir = os.path.join ( os.environ["HOME"], "coriolis-2.x" ) + self._quiet = False self._buildMode = "Release" self._doBuild = True self._noCache = False @@ -78,6 +79,7 @@ class ProjectBuilder: if attribute == "svnTag": self._svnTag = value elif attribute == "rootDir": self._rootDir = value + elif attribute == "quiet": self._quiet = value elif attribute == "buildMode": self._buildMode = value elif attribute == "doBuild": self._doBuild = value elif attribute == "noCache": self._noCache = value @@ -198,8 +200,9 @@ class ProjectBuilder: def _svnStatus ( self, tool ): toolSourceDir = os.path.join ( self._sourceDir , tool ) if not os.path.isdir(toolSourceDir): - print "[ERROR] Missing tool source directory: \"%s\" (skipped)." % toolSourceDir - return + if not self._quiet: + print "[ERROR] Missing tool source directory: \"%s\" (skipped)." % toolSourceDir + return os.chdir ( toolSourceDir ) print "Checking SVN status of tool: ", tool @@ -212,7 +215,8 @@ class ProjectBuilder: def _svnUpdate ( self, tool ): toolSourceDir = os.path.join ( self._sourceDir , tool ) if not os.path.isdir(toolSourceDir): - print "[ERROR] Missing tool source directory: \"%s\" (skipped)." % toolSourceDir + if not self._quiet: + print "[ERROR] Missing tool source directory: \"%s\" (skipped)." % toolSourceDir return os.chdir ( toolSourceDir ) @@ -349,6 +353,7 @@ if __name__ == "__main__": parser = optparse.OptionParser () # Build relateds. + parser.add_option ( "-q", "--quiet" , action="store_true", dest="quiet" ) parser.add_option ( "-r", "--release" , action="store_true", dest="release" ) parser.add_option ( "-d", "--debug" , action="store_true", dest="debug" ) parser.add_option ( "-s", "--static" , action="store_true", dest="static" ) @@ -374,6 +379,7 @@ if __name__ == "__main__": builder.register ( coriolis ) builder.register ( chams ) + if options.quiet: builder.quiet = True if options.release: builder.buildMode = "Release" if options.debug: builder.buildMode = "Debug" if options.static: builder.enableShared = "OFF"