New xorriso-dd-target option -version

This commit is contained in:
2020-01-06 22:02:19 +01:00
parent 557e69ada1
commit 43d5804db3
4 changed files with 40 additions and 9 deletions

View File

@ -14,6 +14,10 @@
# if $no_xorriso_dd_target_run is empty. It implements what xdt_print_usage
# announces.
xdt_print_version() {
echo "xorriso-dd-target , version 1.5.3 , 2020.01.06.204949"
}
## This obtrusive setting shall make the script safe against exotic locales.
## Supposed to stabilize grep expression interpretation and error messages.
@ -135,6 +139,7 @@ xdt_print_usage() {
echo " -dummy -DO_WRITE even against the advice of"
echo " this program. This probably shows you ways to"
echo " shoot your own foot."
echo " -version Print version text and then end the program."
echo " -help Print this text to stdout and then end the program."
echo "Examples:"
echo " $0 -with_sudo -list_all"
@ -219,6 +224,7 @@ xdt_reset_job() {
# Status
xdt_sudo_cmd=
xdt_have_su_power=
xdt_end_after_setup=
return 0
}
@ -319,9 +325,15 @@ xdt_arg_interpreter() {
elif test "X$xdt_i" = "X-no_pacifier"
then
xdt_no_pacifier=y
elif test "X$xdt_i" = "X-version"
then
xdt_print_version
xdt_end_after_setup=y
return 0
elif test "X$xdt_i" = "X-help"
then
xdt_print_usage
xdt_end_after_setup=y
return 0
elif echo "X$xdt_i" | grep -v '^X-' >/dev/null
then
@ -865,6 +877,10 @@ xdt_main()
xdt_reset_job
xdt_arg_interpreter "$@" || return "$?"
if test -n "$xdt_end_after_setup"
then
return 0
fi
if test -n "$xdt_do_plug_test"
then