From 117438375ec1b584a86b72820de992fe5ea2c176 Mon Sep 17 00:00:00 2001 From: Ferry Boender Date: Wed, 22 Apr 2015 18:08:01 +0200 Subject: [PATCH] Support for --version. --- doc/MANUAL.md | 2 ++ src/scriptform.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/MANUAL.md b/doc/MANUAL.md index b6e843e..1c255a6 100644 --- a/doc/MANUAL.md +++ b/doc/MANUAL.md @@ -1,5 +1,7 @@ # Scriptform Manual +This is the manual for version %%VERSION%%. + ## Table of Contents 1. [Invocations](#invocations) diff --git a/src/scriptform.py b/src/scriptform.py index a93bc48..a6a1e08 100755 --- a/src/scriptform.py +++ b/src/scriptform.py @@ -956,7 +956,7 @@ if __name__ == "__main__": sys.argv[0] + " [option] (--start|--stop) ", " " + sys.argv[0] + " --generate-pw", ] - parser = optparse.OptionParser() + parser = optparse.OptionParser(version="%%VERSION%%") parser.set_usage('\n'.join(usage)) parser.add_option("-g", "--generate-pw", dest="generate_pw", action="store_true", default=False, help="Generate password")