From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 8E3B6158015 for ; Mon, 27 Sep 2021 06:49:15 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 18A65E091B; Mon, 27 Sep 2021 06:49:14 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id B7DE2E08A8 for ; Mon, 27 Sep 2021 06:49:13 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id B9726342E74 for ; Mon, 27 Sep 2021 06:49:12 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 24ABC114 for ; Mon, 27 Sep 2021 06:49:11 +0000 (UTC) From: "Mike Frysinger" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Frysinger" Message-ID: <1632725179.692486a6d5b757f485e15a7acf269fd1bf28d970.vapier@gentoo> Subject: [gentoo-commits] proj/locale-gen:master commit in: / X-VCS-Repository: proj/locale-gen X-VCS-Files: locale-gen X-VCS-Directories: / X-VCS-Committer: vapier X-VCS-Committer-Name: Mike Frysinger X-VCS-Revision: 692486a6d5b757f485e15a7acf269fd1bf28d970 X-VCS-Branch: master Date: Mon, 27 Sep 2021 06:49:11 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: f1ab1a4a-5131-4920-98ff-ac850f0bd4f9 X-Archives-Hash: 05bb597bc03e05ac99ecf0c8c40b49b6 commit: 692486a6d5b757f485e15a7acf269fd1bf28d970 Author: Mike Frysinger gentoo org> AuthorDate: Mon Sep 27 06:46:19 2021 +0000 Commit: Mike Frysinger gentoo org> CommitDate: Mon Sep 27 06:46:19 2021 +0000 URL: https://gitweb.gentoo.org/proj/locale-gen.git/commit/?id=692486a6 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 gentoo.org> 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 }