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 '')