mirror of
https://gitlab.com/shorewall/code.git
synced 2025-06-20 01:37:59 +02: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
|
while [ -n "$option" ]; do
|
||||||
case $option in
|
case $option in
|
||||||
v*)
|
v*)
|
||||||
VERBOSITY=$(($VERBOSITY + 1 ))
|
[ $VERBOSITY -lt 2 ] && VERBOSITY=$(($VERBOSITY + 1 ))
|
||||||
option=${option#v}
|
option=${option#v}
|
||||||
;;
|
;;
|
||||||
q*)
|
q*)
|
||||||
VERBOSITY=$(($VERBOSITY - 1 ))
|
[ $VERBOSITY -gt -1 ] && VERBOSITY=$(($VERBOSITY - 1 ))
|
||||||
option=${option#q}
|
option=${option#q}
|
||||||
;;
|
;;
|
||||||
n*)
|
n*)
|
||||||
|
@ -71,11 +71,11 @@ while [ $finished -eq 0 -a $# -gt 0 ]; do
|
|||||||
while [ -n "$option" ]; do
|
while [ -n "$option" ]; do
|
||||||
case $option in
|
case $option in
|
||||||
v*)
|
v*)
|
||||||
VERBOSITY=$(($VERBOSITY + 1 ))
|
[ $VERBOSITY -lt 2 ] && VERBOSITY=$(($VERBOSITY + 1 ))
|
||||||
option=${option#v}
|
option=${option#v}
|
||||||
;;
|
;;
|
||||||
q*)
|
q*)
|
||||||
VERBOSITY=$(($VERBOSITY - 1 ))
|
[ $VERBOSITY -gt -1 ] && VERBOSITY=$(($VERBOSITY - 1 ))
|
||||||
option=${option#q}
|
option=${option#q}
|
||||||
;;
|
;;
|
||||||
n*)
|
n*)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user