From patchwork Tue Jan 21 10:58:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?S=C3=A9bastien_Szymanski?= X-Patchwork-Id: 239866 List-Id: U-Boot discussion From: sebastien.szymanski at armadeus.com (=?UTF-8?q?S=C3=A9bastien=20Szymanski?=) Date: Tue, 21 Jan 2020 11:58:42 +0100 Subject: [PATCH 1/1] tools: imx8m_image: fix warning message Message-ID: <20200121105842.23965-1-sebastien.szymanski@armadeus.com> When a firmware file is missing the warning message doesn't indicate the firmware file name because '$tmp' var doesn't exist. Fix the warning message and while at it reduce the if/else statement. Signed-off-by: Sébastien Szymanski Reviewed-by: Frieder Schrempf --- tools/imx8m_image.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tools/imx8m_image.sh b/tools/imx8m_image.sh index 4959f9c835..ba60104443 100755 --- a/tools/imx8m_image.sh +++ b/tools/imx8m_image.sh @@ -14,10 +14,8 @@ for f in $blobs; do continue fi - if [ -f $f ]; then - continue - else - echo "WARNING '$tmp' not found, resulting binary is not-functional" >&2 + if [ ! -f $f ]; then + echo "WARNING '$f' not found, resulting binary is not-functional" >&2 exit 1 fi done