Commit 9450029e authored by Craig Small's avatar Craig Small

Fixed version printing in dh_makefont

parent cd060cbb
......@@ -10,6 +10,7 @@ import os
import re
import argparse
__version__ = 0.3
##########################################################################
# #
# Variables #
......@@ -28,6 +29,14 @@ UPLOADERS = (os.environ.get('DEBFULLNAME') +
PACKAGE = ""
version_string = '''
dh_makefont - prepare Debian packaging for fonts, version {}
Copyright (C)
2012-2013 Vasudev Kamath <kamathvasudev@gmail.com>
2011-2012 Muneeb Shaikh <iammuneeb@gmail.com>
2011-2012 Shravan Aras <123.shravan@gmail.com>
'''.format(__version__)
GENERATES_TTF = False
GENERATES_OTF = False
......@@ -45,8 +54,11 @@ version=3
# This section of code parses the command line arguments.
arguments = argparse.ArgumentParser(description='dh_makefont',
epilog='Font package helper')
arguments = argparse.ArgumentParser(
prog='dh_makefont',
description='dh_makefont',
formatter_class=argparse.RawTextHelpFormatter,
epilog='Font package helper')
arguments.add_argument('-c', '--copyright',
help='''use <type> of license in copyright file
(apache|artistic|bsd|gpl|gpl2|gpl3|lgpl|lgpl2|
......@@ -70,8 +82,7 @@ arguments.add_argument('-u', '--upstream',
arguments.add_argument('-v', '--version', action='version',
help='Show the version number of dh_makefont',
version='''%(prog)s - prepare Debian packaging for
fonts, version 0.3''')
version=version_string)
###########################################################################
......@@ -372,9 +383,6 @@ def main():
redability
"""
args = arguments.parse_args()
if (args.version):
print_version()
exit(0)
os.chdir(os.path.abspath(args.foldername))
......@@ -413,14 +421,5 @@ def main():
print_todo()
def print_version():
print("""%(prog)s
prepare Debian packaging for fonts, version 0.3 Copyright (C)
2012-2013 Vasudev Kamath <kamathvasudev@gmail.com> 2011-2012 Muneeb
Shaikh
<iammuneeb@gmail.com> 2011-2012 Shravan Aras
<123.shravan@gmail.com>
""")
if __name__ == "__main__":
main()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment