From 692486a6d5b757f485e15a7acf269fd1bf28d970 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 27 Sep 2021 02:46:19 -0400 Subject: 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 --- locale-gen | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/locale-gen b/locale-gen index c746eef..9759daa 100755 --- a/locale-gen +++ b/locale-gen @@ -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 } -- cgit v1.2.3-65-gdbad