Merge pull request #5599 from orbea/tr

qb: Use POSIX character classes instead of character ranges.
This commit is contained in:
Twinaphex 2017-10-24 13:58:30 +02:00 committed by GitHub
commit c2a5296ee3

View File

@ -30,7 +30,7 @@ EOF
echo "Custom options:"
while IFS='=#' read VAR VAL COMMENT; do
VAR=$(echo "${VAR##HAVE_}" | tr '[A-Z]' '[a-z]')
VAR=$(echo "${VAR##HAVE_}" | tr '[:upper:]' '[:lower:]')
case "$VAR" in
'c89_'*) true;;
*)
@ -50,7 +50,7 @@ EOF
}
opt_exists() # $opt is returned if exists in OPTS
{ opt=$(echo "$1" | tr '[a-z]' '[A-Z]')
{ opt=$(echo "$1" | tr '[:lower:]' '[:upper:]')
for OPT in $OPTS; do [ "$opt" = "$OPT" ] && return; done
echo "Unknown option $2"; exit 1
}