From: Thierry Bultel <thierry.bultel@wanadoo.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1] Generation of locales: made call to tr more robust
Date: Sun, 10 Nov 2013 10:50:17 +0100 [thread overview]
Message-ID: <527F56D9.8060809@wanadoo.fr> (raw)
In-Reply-To: <c8339166-9470-405a-ad3f-6f8b4a6e6159@email.android.com>
Le 09/11/2013 14:47, Thomas De Schampheleire a ?crit :
> Thierry Bultel <thierry.bultel@wanadoo.fr> wrote:
>> From: tbultel <tbultel@basystemes.fr>
>>
>> When calling 'tr' without quoting braces, bash can make really weird things
>> if there are existing 'single-letter-named' directories
>> eg:
>> tbultel at laois:~/test$ echo AAA | tr [A-Z] [a-z]
>> aaa
>> tbultel at laois:~/test$ echo AAA | tr [A-Z] [a-z]
>> AAA
>>
>> The (quick) analysis is that the callee (tr) argvs then
>> contain 'm' thus the translation does not work
>>
>> Using quotes works around it
>> tbultel at laois:~/test$ echo AAA | tr '[A-Z]' '[a-z]'
>> aaa
>>
>>
>> Signed-off-by: tbultel <tbultel@basystemes.fr>
>
> This should be real name, not a username.
>
>> ---
>> Makefile | 2 +-
>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/Makefile b/Makefile
>> index 1496bd7..7f835c0 100644
>> --- a/Makefile
>> +++ b/Makefile
>> @@ -548,7 +548,7 @@ target-generatelocales: host-localedef
>> I18NPATH=$(STAGING_DIR)/usr/share/i18n:/usr/share/i18n \
>> $(HOST_DIR)/usr/bin/localedef \
>> --prefix=$(TARGET_DIR) \
>> - --`echo $(BR2_ENDIAN) | tr [A-Z] [a-z]`-endian \
>> + --`echo $(BR2_ENDIAN) | tr '[A-Z]' '[a-z]'`-endian \
>> -i $${inputfile} -f $${charmap} \
>> $${locale} ; \
>> done
>
> While there's nothing wrong with your fix itself, I wonder why this isn't using the UPPERCASE and LOWERCASE macros we have defined in package/pkg-utils.mak...
>
> Best regards,
> Thomas
>
>
>
The LOWERCASE macro does not seem to exist
next prev parent reply other threads:[~2013-11-10 9:50 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-08 16:25 [Buildroot] [PATCH 1/1] Generation of locales: made call to tr more robust Thierry Bultel
2013-11-09 13:47 ` Thomas De Schampheleire
2013-11-10 9:50 ` Thierry Bultel [this message]
2013-11-10 10:17 ` Thomas De Schampheleire
2013-11-10 16:15 ` Arnout Vandecappelle
2013-11-10 16:36 ` Thierry Bultel
2013-11-10 17:01 ` Thomas De Schampheleire
2013-11-10 17:05 ` Thierry Bultel
-- strict thread matches above, loose matches on Subject: below --
2013-11-10 17:03 Thierry Bultel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=527F56D9.8060809@wanadoo.fr \
--to=thierry.bultel@wanadoo.fr \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.