chiark / gitweb /
Improve consistency in program version strings.
[distorted-keys] / shamir.in
index 06da00ff5e8656fb882c1b7228097972b64483a2..019efc95f9de64436732e0f5b4cf2968c382deae 100755 (executable)
--- a/shamir.in
+++ b/shamir.in
@@ -32,6 +32,9 @@ import base64 as B
 from cStringIO import StringIO
 import optparse as OPT
 
+PACKAGE = '@PACKAGE@'
+VERSION = '@VERSION@'
+
 ###--------------------------------------------------------------------------
 ### Arithmetic in GF(2^8).
 ###
@@ -543,7 +546,10 @@ class SubcommandOptionParser (OPT.OptionParser, object):
     opts, args = op.parse_args(args[1:])
     sub.func(gopts, opts, args)
 
-OPTPARSE = SubcommandOptionParser(description = """\
+OPTPARSE = SubcommandOptionParser(
+  usage = '%prog SUBCOMMAND [ARGS ...]',
+  version = '%%prog, %s version %s' % (PACKAGE, VERSION),
+  description = """\
 Split and recombine secrets using Shamir's secret sharing system.
 """)