From d63cb35c0ddf4625bf937a4c5a1d62d3f1a9214c Mon Sep 17 00:00:00 2001 From: Tom Maisey Date: Wed, 30 Mar 2022 08:34:47 +0100 Subject: [PATCH] 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. --- Meta/build-image-qemu.sh | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Meta/build-image-qemu.sh b/Meta/build-image-qemu.sh index d9018a33f9..594049906f 100755 --- a/Meta/build-image-qemu.sh +++ b/Meta/build-image-qemu.sh @@ -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