diff options
author | 2021-09-27 02:46:19 -0400 | |
---|---|---|
committer | 2021-09-27 02:46:19 -0400 | |
commit | 692486a6d5b757f485e15a7acf269fd1bf28d970 (patch) | |
tree | 54331415b57a338d07537d3a169e65c61f07dc0b | |
parent | fix hint about use of / in locale names (diff) | |
download | locale-gen-692486a6d5b757f485e15a7acf269fd1bf28d970.tar.gz locale-gen-692486a6d5b757f485e15a7acf269fd1bf28d970.tar.bz2 locale-gen-692486a6d5b757f485e15a7acf269fd1bf28d970.zip |
switch from tr to bash builtin ${var,,}
This seems to speed things up. Or I'm lying to myself. Either way.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
-rwxr-xr-x | locale-gen | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -196,10 +196,11 @@ fi # https://sourceware.org/git/?p=glibc.git;a=blob;f=locale/programs/localedef.c;hb=glibc-2.34#l562 normalize() { if [[ $1 == *.* ]] ; then - local ret=$(echo ${1##*.} | tr '[[:upper:]]' '[[:lower:]]') - echo ${1%%.*}.${ret//-} + local ret=${1##*.} + ret=${ret,,} + echo "${1%%.*}.${ret//-}" else - echo $1 + echo "$1" fi } |