diff options
author | Stefano Cristiano <sc@recognitionrobotics.com> | 2019-12-25 20:47:43 +0100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-12-27 02:19:55 +0100 |
commit | 49a789ad04f498df445dc8097727e192cbb435f1 (patch) | |
tree | c2bfbabbbdd69c04bb321663950b492c18498d9a /Toolchain | |
parent | b62dbcbf59757f4c5ea9ad580b852d5a393dcf32 (diff) | |
download | serenity-49a789ad04f498df445dc8097727e192cbb435f1.zip |
Build: Allow building serenityOS ext2 root filesystem on macOS host
Diffstat (limited to 'Toolchain')
-rwxr-xr-x | Toolchain/BuildFuseExt2.sh | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/Toolchain/BuildFuseExt2.sh b/Toolchain/BuildFuseExt2.sh new file mode 100755 index 0000000000..3876f58b37 --- /dev/null +++ b/Toolchain/BuildFuseExt2.sh @@ -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 |