#!/usr/bin/sh
BLOCKDEV=${BLOCKDEV:=/dev/mmcblk0p1}
xzcat $1 | dd of=$BLOCKDEV bs=512 status=progress
fsck -f $BLOCKDEV
resize2fs $BLOCKDEV

