[yocto] [meta-raspberrypi][PATCH 1/2] sdcard_image-rpi.bbclass: Fix error in conditional test
seth bollinger
seth.boll at gmail.com
Wed Apr 24 18:00:33 PDT 2013
When the shell tests for rootfs type I was seeing "[[: not found". I
use echo and egrep to test for the xz rootfs type to work around this
error.
Signed-off-by: Seth Bollinger <seth.boll at gmail.com>
---
classes/sdcard_image-rpi.bbclass | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/classes/sdcard_image-rpi.bbclass
b/classes/sdcard_image-rpi.bbclass
index 421f561..7fe7c35 100644
--- a/classes/sdcard_image-rpi.bbclass
+++ b/classes/sdcard_image-rpi.bbclass
@@ -99,7 +99,7 @@ IMAGE_CMD_rpi-sdimg () {
# Burn Partitions
dd if=${WORKDIR}/boot.img of=${SDIMG} conv=notrunc seek=1
bs=$(expr ${IMAGE_ROOTFS_ALIGNMENT} \* 1024) && sync && sync
# If SDIMG_ROOTFS_TYPE is a .xz file use xzcat
- if [[ "$SDIMG_ROOTFS_TYPE" == *.xz ]]
+ if echo "${SDIMG_ROOTFS_TYPE}" | egrep -q "*\.xz"
then
xzcat ${SDIMG_ROOTFS} | dd of=${SDIMG} conv=notrunc seek=1
bs=$(expr 1024 \* ${BOOT_SPACE_ALIGNED} + ${IMAGE_ROOTFS_ALIGNMENT} \*
1024) && sync && sync
else
--
1.7.2.5
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0001-sdcard_image-rpi.bbclass-Fix-error-in-conditional-te.patch
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20130424/dce7d8f0/attachment.ksh>
More information about the yocto
mailing list