mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-23 08:03:11 +01:00
Avoid verbosity overflow/underflow
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
5ad0088ce7
commit
ef4237f5a0
@ -71,11 +71,11 @@ while [ $finished -eq 0 -a $# -gt 0 ]; do
|
||||
while [ -n "$option" ]; do
|
||||
case $option in
|
||||
v*)
|
||||
VERBOSITY=$(($VERBOSITY + 1 ))
|
||||
[ $VERBOSITY -lt 2 ] && VERBOSITY=$(($VERBOSITY + 1 ))
|
||||
option=${option#v}
|
||||
;;
|
||||
q*)
|
||||
VERBOSITY=$(($VERBOSITY - 1 ))
|
||||
[ $VERBOSITY -gt -1 ] && VERBOSITY=$(($VERBOSITY - 1 ))
|
||||
option=${option#q}
|
||||
;;
|
||||
n*)
|
||||
|
@ -71,11 +71,11 @@ while [ $finished -eq 0 -a $# -gt 0 ]; do
|
||||
while [ -n "$option" ]; do
|
||||
case $option in
|
||||
v*)
|
||||
VERBOSITY=$(($VERBOSITY + 1 ))
|
||||
[ $VERBOSITY -lt 2 ] && VERBOSITY=$(($VERBOSITY + 1 ))
|
||||
option=${option#v}
|
||||
;;
|
||||
q*)
|
||||
VERBOSITY=$(($VERBOSITY - 1 ))
|
||||
[ $VERBOSITY -gt -1 ] && VERBOSITY=$(($VERBOSITY - 1 ))
|
||||
option=${option#q}
|
||||
;;
|
||||
n*)
|
||||
|
Loading…
Reference in New Issue
Block a user