[Buildroot] [PATCH 1/1] Generation of locales: made call to tr more robust and added LOWERCASE macro

Peter Korsgaard jacmet at uclibc.org
Sun Nov 10 22:42:03 UTC 2013


>>>>> "Thierry" == Thierry Bultel <thierry.bultel at wanadoo.fr> writes:

> When calling 'tr' without quoting braces, bash can make really weird things
> if there are existing 'single-letter-named' directories
> eg:
> thierry at thierry-desktop:~$ echo AAA | tr [A-Z] [a-z] 
> aaa
> thierry at thierry-desktop:~$ mkdir m
> thierry at thierry-desktop:~$ 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:
> thierry at thierry-desktop:~$ echo AAA | tr '[A-Z]' '[a-z]' 
> aaa


> Changes v1->v2
>   - Added the LOWERCASE macro, following Thomas De Schampheleire's advice

Committed, thanks.

-- 
Bye, Peter Korsgaard


More information about the buildroot mailing list