From 89a0eb7f7c9f78fed7c92fbe6edb2d0c2b3dfa0e Mon Sep 17 00:00:00 2001 From: Thomas Leonard Date: Sat, 13 Jan 2007 11:33:29 +0000 Subject: [PATCH] Added --version option. git-svn-id: https://zero-install.svn.sourceforge.net/svnroot/zero-install/trunk/0publish-gui/trunk/0publish-gui@1382 9f8c893c-44ee-0310-b757-c8ca8341c71e --- 0publish-gui | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/0publish-gui b/0publish-gui index 6c1115c..5d9e706 100755 --- a/0publish-gui +++ b/0publish-gui @@ -1,5 +1,6 @@ #!/usr/bin/env python import rox, os, sys +from optparse import OptionParser from rox import g if sys.version_info < (2, 4): @@ -11,7 +12,20 @@ from main import FeedEditor, choose_feed RESPONSE_SAVE = 0 -args = sys.argv[1:] +version = '0.1' +parser = OptionParser(usage="usage: %prog [options] interface") +parser.add_option("-V", "--version", help="display version information", action='store_true') +(options, args) = parser.parse_args() + +if options.version: + print "0publish-gui (zero-install) " + version + print "Copyright (C) 2007 Thomas Leonard" + print "This program comes with ABSOLUTELY NO WARRANTY," + print "to the extent permitted by law." + print "You may redistribute copies of this program" + print "under the terms of the GNU General Public License." + print "For more information about these matters, see the file named COPYING." + sys.exit(0) if args: for file in args: -- 2.11.4.GIT