[oe] Use of == in shell scripts
obi at opendreambox.org
Tue Oct 26 18:11:30 CEST 2010
On 10/26/2010 05:51 PM, Maupin, Chase wrote:
> Isn't bash the supported shell?
Yes, at least on the build system. Some of the affected files are
executed on the target.
I understand that bash is a requirement for now, but if possible, that
should be changed. I don't think that root access to a machine should be
necessary to build OE on Ubuntu (or maybe even on BSD flavors). Does
Darwin come with bash?
Btw., I discovered the first occurence of this problem with bash on
Debian lenny, where wpa-supplicant unconditionally enabled madwifi
support, because == was used. Maybe under some circumstances the
bash-builtins of '[' and 'test' are not used.
> If I remember correctly in bash "==" will also work with numbers whereas "=" is only for strings.
Both bash and dash on my system handle "[ "0" = 0 ]" or [ "0" = 1 ]
correctly. Another operator "-eq" exists, which is only for numbers.
More information about the Openembedded-devel