osbuilder: Get mount directory size with Mb format
While calculating directory size in imagebuild script, we shoul use
`df -BM` instead of `df -h` to keep Mb format.
Fixes
image-builder: get mount directory size with Mb format
@@ -233,7 +233,7 @@ calculate_required_disk_size() {
die "Could not format loop device: ${device}"
fi
mount "${device}p1" "${mount_dir}"
- avail="$(df -h --output=avail "${mount_dir}" | tail -n1 | sed 's/[M ]//g')"
+ avail="$(df -BM --output=avail "${mount_dir}" | tail -n1 | sed 's/[M ]//g')"
umount "${mount_dir}"
losetup -d "${device}"
