mkimage: misc cosmetic tweaks; umount rootfs/boot only if it's mounted.

This commit is contained in:
Juan RP 2015-02-22 09:39:47 +01:00
parent 69bcb88aa1
commit 3d30dbb7a6

View File

@ -41,7 +41,7 @@ cleanup() {
} }
info_msg() { info_msg() {
printf "\033[1m$@\n\033[m" printf "\033[1m[${PLATFORM}] $@\n\033[m"
} }
die() { die() {
@ -184,12 +184,12 @@ elif [ "$PLATFORM" = "odroid-u2" ]; then
dd if=${ROOTFSDIR}/boot/E4412_S.tzsw.signed.bin of=${LOOPDEV} seek=2111 >/dev/null 2>&1 dd if=${ROOTFSDIR}/boot/E4412_S.tzsw.signed.bin of=${LOOPDEV} seek=2111 >/dev/null 2>&1
fi fi
umount ${ROOTFSDIR}/boot || : mountpoint -q ${ROOTFSDIR}/boot && umount ${ROOTFSDIR}/boot
umount $ROOTFSDIR umount $ROOTFSDIR
losetup -d $LOOPDEV losetup -d $LOOPDEV
rmdir $ROOTFSDIR rmdir $ROOTFSDIR
chmod 644 $FILENAME chmod 644 $FILENAME
info_msg "Successfully created $FILENAME ($PLATFORM) image." info_msg "Successfully created $FILENAME image."
# vim: set ts=4 sw=4 et: # vim: set ts=4 sw=4 et: