mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
ebc: implement --version option for pvics
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 <dan@danny.cz> Reviewed-by: Steffen Eiden <seiden@linux.ibm.com> Signed-off-by: Steffen Eiden <seiden@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
@@ -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
|
||||
'')
|
||||
|
||||
Reference in New Issue
Block a user