Add --version flag to redo.

Something to this effect would be useful, though I'm sure my
install.do changes are not how you'd do it.

(Slightly modified by apenwarr)
This commit is contained in:
Wayne Larsen 2011-01-25 17:13:35 -08:00 committed by Avery Pennarun
commit 39cfdafd8a
2 changed files with 7 additions and 2 deletions

View file

@ -14,12 +14,17 @@ k,keep-going keep going as long as possible even if some targets fail
shuffle randomize the build order to find dependency bugs
debug-locks print messages about file locking (useful for debugging)
debug-pids print process ids as part of log messages (useful for debugging)
version print the current version and exit
"""
o = options.Options('redo', optspec)
(opt, flags, extra) = o.parse(sys.argv[1:])
targets = extra or ['all']
if opt.version:
import version
print version.TAG
sys.exit(0)
if opt.debug:
os.environ['REDO_DEBUG'] = str(opt.debug or 0)
if opt.verbose: