[U-Boot] [PATCH] MAKEALL: Add -l option to only list build targets

Mike Frysinger vapier at gentoo.org
Mon Dec 12 06:49:18 CET 2011


On Sunday 04 December 2011 06:32:47 Marek Vasut wrote:
> > Should it be an equality operator instead of an assigning one?  i.e:
> > 
> > [ "$ONLY_LIST" == "y" ] && return
> 
> 2) It's the same thing ... = and == in shell scripting.

while this is true for the particular piece of code quoted, in general, this 
statement is false.  "==" is a bashism (it is not part of POSIX), and it 
allows you to do comparisons that the "=" operator does not (such as pattern 
matching).

this code uses "=" everywhere with single brackets.  any new code should stick 
to that form.  if you want to use "==", it should be with double brackets, and 
probably have a good reason for it.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20111212/adf1e143/attachment.pgp>


More information about the U-Boot mailing list