diff --git a/ChangeLog-current.txt b/ChangeLog-current.txt index 7e116b9..35cdd7b 100644 --- a/ChangeLog-current.txt +++ b/ChangeLog-current.txt @@ -15,5 +15,8 @@ enhancements: Slackware 13.1. * Added a help item to the main menu of the dialog interface with pointers to documentation and other resources. + * Added an option to print the version of sbopkg. We try not to change the + meaning of flags but note that this does change what was the '-v' flag to + '-V' and now uses '-v' for its customary 'version' purpose. +--------------------------+ diff --git a/src/usr/sbin/sbopkg b/src/usr/sbin/sbopkg index 0cbd3cd..d0e8d2c 100755 --- a/src/usr/sbin/sbopkg +++ b/src/usr/sbin/sbopkg @@ -4391,7 +4391,7 @@ else fi # This is the command line options and help. -while getopts ":b:cd:e:f:g:hi:klopqrRs:uv:" OPT; do +while getopts ":b:cd:e:f:g:hi:klopqrRs:uV:v" OPT; do case $OPT in b ) # Build BFLAG=1 @@ -4459,7 +4459,11 @@ while getopts ":b:cd:e:f:g:hi:klopqrRs:uv:" OPT; do UPDATE=1 unset DIAG ;; - v ) # Set repository + v ) # print version + echo $SBOVER + exit + ;; + V ) # Set repository VERSION=1 CUSTOMVER="$OPTARG" ;; @@ -4489,7 +4493,8 @@ Options are: -s package(s) Specific search by specific package and, if found, display package information. -u Check for an update to sbopkg. - -v repo/branch Set the repository/branch (e.g. "-v SBo/13.0"). + -v Print sbopkg's version on stdout. + -V repo/branch Set the repository/branch (e.g. "-v SBo/13.0"). If the repository name is not specified, sbopkg will first try with the default one. If no match is found, sbopkg will look for the first matching branch of any repository.