From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Frysinger Date: Mon, 12 Dec 2011 00:49:18 -0500 Subject: [U-Boot] [PATCH] MAKEALL: Add -l option to only list build targets In-Reply-To: <201112041232.47531.marek.vasut@gmail.com> References: <1322897523-6663-1-git-send-email-marek.vasut@gmail.com> <201112041232.47531.marek.vasut@gmail.com> Message-ID: <201112120049.19430.vapier@gentoo.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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: