From: Tom Rini Date: Sat, 24 Oct 2015 17:15:46 -0400 Subject: [U-Boot] [U-Boot, V2, 3/3] fs-test.sh: fix pre-requisite detection In-Reply-To: <1443902208-21220-3-git-send-email-swarren@wwwdotorg.org> References: <1443902208-21220-3-git-send-email-swarren@wwwdotorg.org> Message-ID: <20151024211546.GS23893@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Sat, Oct 03, 2015 at 01:56:48PM -0600, Stephen Warren wrote: > In the following snippet: > > if [ ! -x `which $prereq` ]; then > > When $prereq does not exist, `which $prereq` evaluates to the empty string, > which results in *no* argument being passed to the -x operator, which then > evaluates to true, which is the equivalent of the prereq having been found. In > order for this to fail as expected, we must pass an empty argument, which then > causes -x to fail. Do this by wrapping the `` in quotes so there's always an > argument to -x, even if the value of the argument is zero-length. > > Signed-off-by: Stephen Warren > Reviewed-by: Simon Glass > Tested-by: Simon Glass Applied to u-boot/master, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: