Index: tools/make_version.py |
=================================================================== |
--- tools/make_version.py (revision 43028) |
+++ tools/make_version.py (working copy) |
@@ -35,9 +35,10 @@ |
'symbols.cc', |
] |
-def makeVersionString(): |
+def makeVersionString(quiet): |
version_string = utils.GetVersion() |
- debugLog("Returning version string: %s " % version_string) |
+ if not quiet: |
+ debugLog("Returning version string: %s " % version_string) |
return version_string |
@@ -50,9 +51,9 @@ |
return vmhash.hexdigest() |
-def makeFile(output_file, input_file): |
+def makeFile(quiet, output_file, input_file): |
version_cc_text = open(input_file).read() |
- version_string = makeVersionString() |
+ version_string = makeVersionString(quiet) |
version_cc_text = version_cc_text.replace("{{VERSION_STR}}", |
version_string) |
version_time = time.ctime(time.time()) |
@@ -69,6 +70,9 @@ |
try: |
# Parse input. |
parser = OptionParser() |
+ parser.add_option("-q", "--quiet", |
+ action="store_true", default=False, |
+ help="disable console output") |
parser.add_option("--output", |
action="store", type="string", |
help="output file name") |
@@ -88,7 +92,7 @@ |
for arg in args: |
files.append(arg) |
- if not makeFile(options.output, options.input): |
+ if not makeFile(options.quiet, options.output, options.input): |
return -1 |
return 0 |