All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andreas Oberritter <obi@opendreambox.org>
To: openembedded-devel@lists.openembedded.org
Subject: Re: Use of == in shell scripts
Date: Tue, 26 Oct 2010 18:11:30 +0200	[thread overview]
Message-ID: <4CC6FDB2.6050401@opendreambox.org> (raw)
In-Reply-To: <131E5DFBE7373E4C8D813795A6AA7F0803110B3CFC@dlee06.ent.ti.com>

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.

Regards,
Andreas



  parent reply	other threads:[~2010-10-26 16:12 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-26 15:31 Use of == in shell scripts Andreas Oberritter
2010-10-26 15:47 ` Andreas Oberritter
2010-10-26 16:29   ` Michael Smith
2010-10-26 23:36     ` Andreas Oberritter
2010-10-27  1:47       ` Mike Detwiler
2010-11-13 16:10       ` Andreas Oberritter
2010-11-14 23:40         ` Michael Smith
2010-10-26 15:51 ` Maupin, Chase
2010-10-26 16:03   ` Chris Larson
2010-10-26 16:11   ` Andreas Oberritter [this message]
2010-10-26 16:21     ` Michael Smith

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=4CC6FDB2.6050401@opendreambox.org \
    --to=obi@opendreambox.org \
    --cc=openembedded-devel@lists.openembedded.org \
    /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.