From 9386a35e47ede3f754e6fdc6a2ef7d4531f6fa33 Mon Sep 17 00:00:00 2001 From: Arata Notsu Date: Tue, 12 Feb 2013 16:40:26 +0900 Subject: [PATCH] ramdisk-image-create shows a failed binary dependency This patch fixes a problem: if a binary is not found, the script exits without a message informs what is needed (because of 'set -e'). Change-Id: I00b8917918f0e6eddf8506d6548432077eb4bf14 --- lib/ramdisk-functions | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/ramdisk-functions b/lib/ramdisk-functions index a8b249c9..c35c3b61 100644 --- a/lib/ramdisk-functions +++ b/lib/ramdisk-functions @@ -40,8 +40,7 @@ function ensure_binaries() { done for _BIN in $BINARY_DEPS ; do - _LOCATION="" - _LOCATION="${_LOCATION:-$(which $_BIN)}" + _LOCATION=$(which "$_BIN" || echo "") if [ -z "$_LOCATION" ]; then echo "$_BIN is not found in your PATH" 1>&2 echo "Please install it on your system"