synopsis = "Usage: allmydata <command> [command options]"
optFlags = [
- ["quiet", "q", "operate silently"],
+ ["quiet", "q", "Operate silently."],
+ ["version", "V", "Display version numbers and exit."],
]
subCommands = []
subCommands += debug.subCommands
subCommands += cli.subCommands
+ def opt_version(self):
+ from twisted import copyright
+ import allmydata, zfec, foolscap
+ print "Twisted version:", copyright.version
+ print "Foolscap version:", foolscap.__version__
+ print "zfec version:", zfec.__version__
+ print "allmydata version:", allmydata.__version__
+ sys.exit(0)
+
def postOptions(self):
if not hasattr(self, 'subOptions'):
raise usage.UsageError("must specify a command")