Merge pull request #2561 from rapiz1/patch-4

osbuilder: fix inconsistent calculation of fs size
This commit is contained in:
Bin Liu
2021-09-04 15:14:07 +08:00
committed by GitHub

View File

@@ -242,7 +242,7 @@ calculate_required_disk_size() {
local fs_type="$2"
local block_size="$3"
readonly rootfs_size_mb=$(du -B 1MB -s "${rootfs}" | awk '{print $1}')
readonly rootfs_size_mb=$(du -B 1M -s "${rootfs}" | awk '{print $1}')
readonly image="$(mktemp)"
readonly mount_dir="$(mktemp -d)"
readonly max_tries=20