tools: imx8m_image: fix warning message
authorSébastien Szymanski <sebastien.szymanski@armadeus.com>
Tue, 21 Jan 2020 10:58:42 +0000 (11:58 +0100)
committerStefano Babic <sbabic@denx.de>
Sun, 9 Feb 2020 13:57:38 +0000 (14:57 +0100)
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 <sebastien.szymanski@armadeus.com>
Reviewed-by: Frieder Schrempf <frieder.schrempf@kontron.de>
tools/imx8m_image.sh

index 4959f9c83539faecf200779104e3b0102fd94fe4..ba6010444353acb04f80bb5b6f6affa48a8792bb 100755 (executable)
@@ -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