summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xlocale-gen7
1 files 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
}