Tweak the handling of the EXTRAVERBOSE transition
authorSteve McIntyre <steve@einval.com>
Sun, 26 Oct 2014 01:15:35 +0000 (01:15 +0000)
committerSteve McIntyre <steve@einval.com>
Sun, 26 Oct 2014 01:15:35 +0000 (01:15 +0000)
Some people are reporting errors with EXTRAVERBOSE=y slipping
through. Hopefully fix that. (Issue 80)

abcde

diff --git a/abcde b/abcde
index 76601ae..363875a 100755 (executable)
--- a/abcde
+++ b/abcde
@@ -3448,14 +3448,16 @@ if [ "$CDROM" = "" ] ; then
 fi
 
 # We used to use EXTRAVERBOSE=y to turn on more debug output. Now
-# that's changed to a number to allow for more control. If
-# EXTRAVERBOSE=y, set it to 1 for backwards compatibility.
-if [ "$EXTRAVERBOSE" = "y" ]; then
-       EXTRAVERBOSE=1
-fi
-if [ "$EXTRAVERBOSE" = "n" ]; then
-       EXTRAVERBOSE=0
-fi
+# that's changed to a number to allow for more control. Deal with
+# EXTRAVERBOSE=y/n, set it to 1/0 for backwards compatibility.
+case "$EXTRAVERBOSE"x in
+       "*y*"x|"*Y*"x)
+               EXTRAVERBOSE=1
+               ;;
+       "*n*"x|"*N*")
+               EXTRAVERBOSE=0
+               ;;
+esac
 
 # Parse command line options
 #while getopts 1a:bc:C:d:Dehj:klLmMnNo:pPq:r:Rs:S:t:T:vVxw:W: opt ; do