Merge pull request #13 from KristofRobot/xz-fix

sdcard_image-sunxi.bbclass: fixed .xz check
This commit is contained in:
Aguirre 2013-12-15 23:03:53 -08:00
commit 92d1408c46

View File

@ -75,7 +75,7 @@ IMAGE_CMD_sunxi-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