diff bin/fjail @ 81:124faa20ae80

Implemented a "-V" global option to print the program's name and version number to stdout
author Franz Glasner <fzglas.hg@dom66.de>
date Fri, 16 Aug 2019 09:16:27 +0200
parents f5cf08e8d246
children 56dd768b5fdd
line wrap: on
line diff
--- a/bin/fjail	Thu Aug 15 23:26:39 2019 +0200
+++ b/bin/fjail	Fri Aug 16 09:16:27 2019 +0200
@@ -11,6 +11,8 @@
 
 OPTIONS:
 
+  -V    Print the program name and version number to stdout and exit
+
   -h    Print this help message to stdout and exit
 
 COMMANDS:
@@ -230,8 +232,12 @@
 #
 # Global option handling
 #
-while getopts "h" _opt ; do
+while getopts "Vh" _opt ; do
     case ${_opt} in
+        V)
+            echo "fjail v${VERSION} (rv:@@HGREVISION@@)"
+            exit 0
+            ;;
         h)
             echo "${USAGE}"
             exit 0