1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 03:07:36 +00:00

Build: Allow building serenityOS ext2 root filesystem on macOS host

This commit is contained in:
Stefano Cristiano 2019-12-25 20:47:43 +01:00 committed by Andreas Kling
parent b62dbcbf59
commit 49a789ad04
4 changed files with 82 additions and 10 deletions

26
Toolchain/BuildFuseExt2.sh Executable file
View file

@ -0,0 +1,26 @@
#!/bin/sh
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
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