From 90e296a3f7dbd1e4e8eb63162c1d308387720448 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=BCller?= Date: Tue, 4 May 2021 22:30:01 +0200 Subject: [PATCH] card-helpers: Add hint for tired users running non matching card-write scripts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Andreas Müller (cherry picked from commit 715ae745b6fcc04fc849b4fb42d1f24d57496fd4) --- scripts/include/card-helpers.inc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/include/card-helpers.inc b/scripts/include/card-helpers.inc index 090b755..75e11bd 100644 --- a/scripts/include/card-helpers.inc +++ b/scripts/include/card-helpers.inc @@ -104,7 +104,13 @@ SelectDeployedFile() { if [ -z "$_TMPDIR" ]; then ErrorOut "Bitbake environment variable TMPDIR not found!" fi - for FilePath in `find ${_TMPDIR}/deploy/images/${Machine} $FindString | sort` ; do + DeployPath=${_TMPDIR}/deploy/images/${Machine} + if [ ! -e ${DeployPath} ]; then + echo "${style_yellow}${style_bold}DeployPath: ${DeployPath}${style_normal}" + ErrorOut "Deploy path for ${Machine} not found! Wrong script started?" + fi + + for FilePath in `find ${DeployPath} $FindString | sort` ; do iCount=`expr $iCount + 1` RootFileNameArr[${iCount}]="$FilePath" FileSize=`du -Dh "$FilePath" | cut -f1`