. let you specify IMG as a block device directly. this minimizes
i/o (only write used parts of the filesystem) and so turnaround
time - while still allowing the big default FS size.
Change-Id: Ib738499464e0d350a474a706f688d3f10806207d
#
# Artifacts from this script are stored in the IMG_DIR
#
-rm -rf ${IMG_DIR} ${IMG}
+rm -rf ${IMG_DIR}
+
+if [ -f ${IMG} ] # IMG might be a block device
+then rm -f ${IMG}
+fi
+
mkdir -p ${IMG_DIR}
#
# Write the partition table using the natively compiled
# minix partition utility
#
-${CROSS_TOOLS}/nbpartition -m ${IMG} ${FAT_START} "c:${FAT_SIZE}*" \
+${CROSS_TOOLS}/nbpartition -f -m ${IMG} ${FAT_START} "c:${FAT_SIZE}*" \
81:${_ROOT_SIZE} 81:${_USR_SIZE} 81:${_HOME_SIZE}
#