Files
serenity/Toolchain/BuildFuseExt2.sh
Sönke Holz 9d4f761f6c Meta: Run shellcheck with --external-sources
From the shellcheck man page:
> This option defaults to false only due to ShellCheck's origin as a
> remote service for checking untrusted scripts.
> It can safely be enabled for normal development.

This allows us to remove the `shellcheck source=/dev/null` workaround
in most places.
2025-08-01 17:55:05 +02:00

35 lines
793 B
Bash
Executable File

#!/usr/bin/env bash
set -e
# This file will need to be run in bash.
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
. "${DIR}/../Meta/shell_include.sh"
exit_if_running_as_root "Do not run BuildFuseExt2.sh as root, parts of your Toolchain directory will become root-owned"
export PATH="/usr/local/opt/m4/bin:$PATH"
die() {
echo "die: $*"
exit 1
}
if [[ "$OSTYPE" != "darwin"* ]]; then
die "This script makes sense to be run only on macOS"
fi
mkdir -p "$DIR"/Tarballs
pushd "$DIR"/Tarballs
if [ ! -d fuse-ext2 ]; then
git clone https://github.com/alperakcan/fuse-ext2.git
fi
cd fuse-ext2
./autogen.sh
CFLAGS="-I/usr/local/include/osxfuse/ -I/$(brew --prefix e2fsprogs)/include" LDFLAGS="-L$(brew --prefix e2fsprogs)/lib" ./configure
make
sudo make install
popd