sdcard_image-sunxi.bbclass: fixed .xz check

.xz check was relying on a bash check that was not working,
returning "]] : not found" error.
Replaced that check with an sh-compatible check,
from https://github.com/djwillis/meta-raspberrypi/blob/master/classes/sdcard_image-rpi.bbclass
This commit is contained in:
Kristof Robot 2013-12-14 18:21:00 +01:00
parent 694420f4d4
commit 7880894810

View File

@ -75,7 +75,7 @@ IMAGE_CMD_sunxi-sdimg () {
# Burn Partitions # Burn Partitions
dd if=${WORKDIR}/boot.img of=${SDIMG} conv=notrunc seek=1 bs=$(expr ${IMAGE_ROOTFS_ALIGNMENT} \* 1024) && sync && sync 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 is a .xz file use xzcat
if [[ "$SDIMG_ROOTFS_TYPE" == *.xz ]] if echo "${SDIMG_ROOTFS_TYPE}" | egrep -q "*\.xz"
then then
xzcat ${SDIMG_ROOTFS} | dd of=${SDIMG} conv=notrunc seek=1 bs=$(expr 1024 \* ${BOOT_SPACE_ALIGNED} + ${IMAGE_ROOTFS_ALIGNMENT} \* 1024) && sync && sync xzcat ${SDIMG_ROOTFS} | dd of=${SDIMG} conv=notrunc seek=1 bs=$(expr 1024 \* ${BOOT_SPACE_ALIGNED} + ${IMAGE_ROOTFS_ALIGNMENT} \* 1024) && sync && sync
else else