Changed general option -k -c -f in releng_getopts.inc
This commit is contained in:
parent
feed351d0e
commit
54855eb89e
@ -6,7 +6,7 @@ SELF=$(basename $0)
|
|||||||
RELENG_XORRISO=0
|
RELENG_XORRISO=0
|
||||||
KEEP=0
|
KEEP=0
|
||||||
SIMULATE_FAILURE=0
|
SIMULATE_FAILURE=0
|
||||||
CLEANUP=1
|
CLEANUP=0
|
||||||
RELENG_PRINTED_HELP=0
|
RELENG_PRINTED_HELP=0
|
||||||
|
|
||||||
START_DIR_DONT_CHANGE=`pwd`
|
START_DIR_DONT_CHANGE=`pwd`
|
||||||
@ -16,14 +16,13 @@ GEN_DATA_DIR=releng_generated_data/${SELF}
|
|||||||
print_help() {
|
print_help() {
|
||||||
cat << EOF
|
cat << EOF
|
||||||
|
|
||||||
Usage: $SELF -x path/to/xorriso [-k0|1] [-f0|1] [-c0|1] [-h]
|
Usage: $SELF -x path/to/xorriso [-k] [-f] [-c] [-h]
|
||||||
[-- ...test specific options...]
|
[-- ...test specific options...]
|
||||||
General options:
|
General options:
|
||||||
-x absolute or relative path to binary to be run.
|
-x absolute or relative path to xorriso binary to be run.
|
||||||
-k keep selfgenerated data (values 0,1, default 0).
|
-k keep selfgenerated data.
|
||||||
-c cleanup selfgenerated data kept from previous
|
-c cleanup selfgenerated data kept from previous run and exit.
|
||||||
run and exit (values 0,1, default 0).
|
-f simulate failure.
|
||||||
-f simulate failure (values 0,1, default 0).
|
|
||||||
-- end of general options, begin of test specific options.
|
-- end of general options, begin of test specific options.
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
@ -83,6 +82,8 @@ cleanup() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#############################################
|
||||||
|
|
||||||
check_for_xorriso() {
|
check_for_xorriso() {
|
||||||
# $1: if "-x" then check executability
|
# $1: if "-x" then check executability
|
||||||
|
|
||||||
@ -90,7 +91,8 @@ check_for_xorriso() {
|
|||||||
then
|
then
|
||||||
print_help
|
print_help
|
||||||
# print_specific_help
|
# print_specific_help
|
||||||
echo "${SELF}: Need -x absolute or relative path to binary to be run."
|
echo
|
||||||
|
echo "${SELF}: Need -x absolute or relative path to xorriso binary."
|
||||||
echo
|
echo
|
||||||
exit 31
|
exit 31
|
||||||
fi
|
fi
|
||||||
@ -98,6 +100,7 @@ check_for_xorriso() {
|
|||||||
then
|
then
|
||||||
print_help
|
print_help
|
||||||
# print_specific_help
|
# print_specific_help
|
||||||
|
echo
|
||||||
echo "${SELF}: Path given by option -x does not lead to an executable file."
|
echo "${SELF}: Path given by option -x does not lead to an executable file."
|
||||||
echo "Given is: '$RELENG_XORRISO'"
|
echo "Given is: '$RELENG_XORRISO'"
|
||||||
if test "$RELENG_XORRISO" = "xorriso"
|
if test "$RELENG_XORRISO" = "xorriso"
|
||||||
@ -129,22 +132,13 @@ do
|
|||||||
elif test x"$i" = x"-x"
|
elif test x"$i" = x"-x"
|
||||||
then
|
then
|
||||||
next_is="x"
|
next_is="x"
|
||||||
elif test x"$i" = x"-k" -o x"$i" = x"-k0"
|
elif test x"$i" = x"-k"
|
||||||
then
|
|
||||||
KEEP=0
|
|
||||||
elif test x"$i" = x"-k1"
|
|
||||||
then
|
then
|
||||||
KEEP=1
|
KEEP=1
|
||||||
elif test x"$i" = x"-c" -o x"$i" = x"-c0"
|
elif test x"$i" = x"-c"
|
||||||
then
|
|
||||||
CLEANUP=0
|
|
||||||
elif test x"$i" = x"-c1"
|
|
||||||
then
|
then
|
||||||
CLEANUP=1
|
CLEANUP=1
|
||||||
elif test x"$i" = x"-f" -o x"$i" = x"-f0"
|
elif test x"$i" = x"-f"
|
||||||
then
|
|
||||||
SIMULATE_FAILURE=0
|
|
||||||
elif test x"$i" = x"-f1"
|
|
||||||
then
|
then
|
||||||
SIMULATE_FAILURE=1
|
SIMULATE_FAILURE=1
|
||||||
elif test x"$i" = x"-h"
|
elif test x"$i" = x"-h"
|
||||||
|
Loading…
Reference in New Issue
Block a user