Meta: Fix e2fsck variable on macOS in build-image-qemu.sh

Despite carefully adding homebrew's e2fsprogs to the PATH,
the script then defined E2FSCK as if we are always on Linux.
This commit is contained in:
Tom Maisey 2022-03-30 08:34:47 +01:00 committed by Brian Gianforcaro
parent 6581cf47ab
commit d63cb35c0d
Notes: sideshowbarker 2024-07-17 16:30:09 +09:00

View file

@ -32,6 +32,14 @@ if [ "$(uname -s)" = "Darwin" ]; then
export PATH="/usr/local/opt/e2fsprogs/sbin:$PATH"
export PATH="/opt/homebrew/opt/e2fsprogs/bin:$PATH"
export PATH="/opt/homebrew/opt/e2fsprogs/sbin:$PATH"
E2FSCK="e2fsck"
else
E2FSCK="/usr/sbin/e2fsck"
if [ ! -f "$E2FSCK" ]; then
E2FSCK=/sbin/e2fsck
fi
fi
SCRIPT_DIR="$(dirname "${0}")"
@ -74,12 +82,6 @@ DISK_SIZE_BYTES=$((($(disk_usage "$SERENITY_SOURCE_DIR/Base") + $(disk_usage Roo
DISK_SIZE_BYTES=$(((DISK_SIZE_BYTES + (INODE_COUNT * INODE_SIZE * 2)) * 3))
INODE_COUNT=$((INODE_COUNT * 7))
E2FSCK="/usr/sbin/e2fsck"
if [ ! -f "$E2FSCK" ]; then
E2FSCK=/sbin/e2fsck
fi
USE_EXISTING=0
if [ -f _disk_image ]; then