2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 14:07:59 +00:00

[rt46602] Clean up getopts usage

Ensure case clauses are in sync with the string passed to getopts.
Remove catch-all clauses as they will never be evaluated.
This commit is contained in:
Michał Kępień 2018-01-26 13:05:02 +01:00 committed by Stephen Morris
parent fe51c34df3
commit 0dcee1cad3
4 changed files with 1 additions and 5 deletions

View File

@ -24,7 +24,6 @@ runall=0
while getopts "r" flag; do
case $flag in
r) runall=1 ;;
*) exit 1;;
esac
done
shift `expr $OPTIND - 1`

View File

@ -17,13 +17,12 @@ stopservers=true
clean=true
baseport=5300
while getopts "rnp:d:" flag; do
while getopts "knp:r" flag; do
case "$flag" in
k) stopservers=false ;;
n) clean=false ;;
p) baseport=$OPTARG ;;
r) runall="-r" ;;
*) exit 1 ;;
esac
done
shift `expr $OPTIND - 1`

View File

@ -25,7 +25,6 @@ usage="Usage: ./runall.sh [-n] [numprocesses]"
while getopts "n" flag; do
case "$flag" in
n) CLEANFLAG="NOCLEAN=-n" ;;
*) echo "$usage" >&2 ; exit 1 ;;
esac
done
shift `expr $OPTIND - 1`

View File

@ -29,7 +29,6 @@ keepfile=0
while getopts "n" flag; do
case $flag in
n) keepfile=1 ;;
*) exit 1 ;;
esac
done