diff bin/check-ports @ 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 671130d10c21
children 56dd768b5fdd
line wrap: on
line diff
--- a/bin/check-ports	Thu Aug 15 23:26:39 2019 +0200
+++ b/bin/check-ports	Fri Aug 16 09:16:27 2019 +0200
@@ -203,8 +203,12 @@
 short_flag=""
 verbose_flag=""
 
-while getopts "Aasv" _opt ; do
+while getopts "VAasv" _opt ; do
     case ${_opt} in
+	V)
+            echo "check-ports v${VERSION} (rv:@@HGREVISION@@)"
+            exit 0
+	    ;;
         A)
             # print for every package the status of all repositories
             alldata_flag=1