From 8bb20be528335add5be494b1b13700bf6c3bc070 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Thu, 4 Jun 2026 08:15:48 +0000 Subject: [PATCH] ebc: implement --version option for pvics MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit For consistency reasons implement the --version option handling for the new pvics tool. Closes: https://github.com/ibm-s390-linux/s390-tools/pull/203 [seiden@linux.ibm.com: Add link to GH PR] Signed-off-by: Dan Horák Reviewed-by: Steffen Eiden Signed-off-by: Steffen Eiden Signed-off-by: Jan Höppner --- scripts/pvics | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/scripts/pvics b/scripts/pvics index a42a60bd..fa8c5652 100755 --- a/scripts/pvics +++ b/scripts/pvics @@ -710,7 +710,8 @@ Actions: echo " Options: - -h, --help Show this help text" + -h, --help Show this help text + --version Show version information" if [[ "${action}" == "[ACTION]" ]]; then echo -e "\t-c, --config\t\tConfiguration yaml file" fi @@ -720,6 +721,13 @@ Options: return 0 } +print_version() { + cat <<-EOD + $0: version %S390_TOOLS_VERSION% + Copyright IBM Corp. + EOD +} + # # CLI FUNCTIONS @@ -747,7 +755,7 @@ cli() { shift fi - temp=$(getopt -o 'hc:i:' --long 'help,config:,image:' -- "$@") + temp=$(getopt -o 'hc:i:' --long 'help,version,config:,image:' -- "$@") if ! eval set -- "$temp"; then usage return 1 @@ -762,6 +770,10 @@ cli() { usage exit 0 ;; + '--version') + print_version + exit 0 + ;; '-c'|'--config') case "$2" in '')