ldcheck.py

changeset 100
62759e5c4554
parent 98
f9d4e59392f7
child 109
b627f8963a84
--- a/ldcheck.py	Tue Aug 25 22:10:04 2020 +0300
+++ b/ldcheck.py	Tue Aug 25 22:20:15 2020 +0300
@@ -3,6 +3,10 @@
 if version_info < (3, 4):
     raise RuntimeError('Python 3.4 or newer required')
 
+appname = 'ldcheck'
+version = (0, 0, 9999)
+version_string = str.join('.', map(str, version))
+
 from colours import load_colours
 from geometry import *
 from pathlib import Path
@@ -130,6 +134,13 @@
         action = 'store_true',
         help = 'use colors'
     )
+    parser.add_argument('-v', '--version',
+        action = 'version',
+        version = str.format('{appname} {version}',
+            appname = appname,
+            version = version_string,
+        ),
+    )
     args = parser.parse_args()
     config = load_config('ldcheck.cfg')
     for ldconfig_ldr_path in find_ldconfig_ldr_paths(config):

mercurial