Removed usage of getopts in releng_getopts.inc
This commit is contained in:
parent
b6e5e80b4f
commit
bbd7a48095
@ -85,10 +85,6 @@ cleanup() {
|
|||||||
|
|
||||||
#############################################
|
#############################################
|
||||||
|
|
||||||
no_getopts=1
|
|
||||||
if test "$no_getopts" = 1
|
|
||||||
then
|
|
||||||
|
|
||||||
next_is=
|
next_is=
|
||||||
for i in "$@"
|
for i in "$@"
|
||||||
do
|
do
|
||||||
@ -144,41 +140,6 @@ then
|
|||||||
exit 31
|
exit 31
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# no_getopts = 1
|
|
||||||
else
|
|
||||||
# no_getopts != 1
|
|
||||||
|
|
||||||
while getopts "x:k:c:f:h" OPTION
|
|
||||||
do
|
|
||||||
case $OPTION in
|
|
||||||
x)
|
|
||||||
RELENG_XORRISO=$OPTARG
|
|
||||||
;;
|
|
||||||
k)
|
|
||||||
KEEP=$OPTARG
|
|
||||||
;;
|
|
||||||
c)
|
|
||||||
CLEANUP=$OPTARG
|
|
||||||
cleanup
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
f)
|
|
||||||
SIMULATE_FAILURE=$OPTARG
|
|
||||||
;;
|
|
||||||
h)
|
|
||||||
print_help
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
# print_help
|
|
||||||
# exit 31
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
# no_getopts != 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
# Each releng_ test should decide whether or not to check that
|
# Each releng_ test should decide whether or not to check that
|
||||||
#if [ ! -x $RELENG_XORRISO ]; then
|
#if [ ! -x $RELENG_XORRISO ]; then
|
||||||
@ -200,9 +161,3 @@ if [ x"$CLEANUP" != x"0" -a x"$CLEANUP" != x"1" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
# <<< This cannot happen if $no_getopts = 1
|
|
||||||
if [ x"$SIMULATE_FAILURE" != x"0" -a x"$SIMULATE_FAILURE" != x"1" ]; then
|
|
||||||
print_help
|
|
||||||
printf "\n${SELF}: -f simulate failure.\n\n"
|
|
||||||
exit 31
|
|
||||||
fi
|
|
||||||
|
Loading…
Reference in New Issue
Block a user