1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 09:24:57 +00:00

Meta: Run 'du' with '--apparent-size', except on macOS

Fixes #7172.
This commit is contained in:
Siddharth Kapoor 2021-05-16 14:50:46 -07:00 committed by GitHub
parent 2eb9dca782
commit dbd9d13857
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 0 deletions

View file

@ -25,7 +25,11 @@ if [ -z $syslinux_dir ]; then
fi
disk_usage() {
if [ "$(uname -s)" = "Darwin" ]; then
du -sm "$1" | cut -f1
else
du -sm --apparent-size "$1" | cut -f1
fi
}
DISK_SIZE=$(($(disk_usage "$SERENITY_SOURCE_DIR/Base") + $(disk_usage Root) + 300))