summaryrefslogtreecommitdiff
path: root/Meta/build-image-qemu.sh
diff options
context:
space:
mode:
Diffstat (limited to 'Meta/build-image-qemu.sh')
-rwxr-xr-xMeta/build-image-qemu.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/Meta/build-image-qemu.sh b/Meta/build-image-qemu.sh
index 9e0ae43143..4cb6e88b83 100755
--- a/Meta/build-image-qemu.sh
+++ b/Meta/build-image-qemu.sh
@@ -20,7 +20,11 @@ fi
disk_usage() {
# shellcheck disable=SC2003
+if [ "$(uname -s)" = "Darwin" ]; then
expr "$(du -sk "$1" | cut -f1)" / 1024
+else
+ expr "$(du -sk --apparent-size "$1" | cut -f1)" / 1024
+fi
}
DISK_SIZE=$(($(disk_usage "$SERENITY_SOURCE_DIR/Base") + $(disk_usage Root) + 100))