Add a link to the Sphinx homepage when sphinx-build is called with -h.

This commit is contained in:
Georg Brandl 2013-01-12 12:18:56 +01:00
parent 4eead33488
commit 7089bd5ff6

View File

@ -75,11 +75,14 @@ def main(argv):
nocolor() nocolor()
try: try:
opts, args = getopt.getopt(argv[1:], 'ab:t:d:c:CD:A:ng:NEqQWw:PThv', opts, args = getopt.getopt(argv[1:], 'ab:t:d:c:CD:A:nNEqQWw:PThv',
['help', 'version']) ['help', 'version'])
allopts = set(opt[0] for opt in opts) allopts = set(opt[0] for opt in opts)
if '-h' in allopts or '--help' in allopts: if '-h' in allopts or '--help' in allopts:
usage(argv) usage(argv)
print >>sys.stderr
print >>sys.stderr, 'For more information, see '\
'<http://sphinx-doc.org/>.'
return 0 return 0
if '--version' in allopts: if '--version' in allopts:
print 'Sphinx (sphinx-build) %s' % __version__ print 'Sphinx (sphinx-build) %s' % __version__