From 770b88b2ce696fddd2fdb99bbcd894a43b519f48 Mon Sep 17 00:00:00 2001 From: Seth Bollinger Date: Mon, 22 Apr 2013 07:23:45 -0500 Subject: sdcard_image-rpi.bbclass: Fix error in conditional test 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 Signed-off-by: Andrei Gherzan --- classes/sdcard_image-rpi.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'classes') diff --git a/classes/sdcard_image-rpi.bbclass b/classes/sdcard_image-rpi.bbclass index 05087b5..a2fcd52 100644 --- a/classes/sdcard_image-rpi.bbclass +++ b/classes/sdcard_image-rpi.bbclass @@ -101,7 +101,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 -- cgit v1.2.3-54-g00ecf