ladybird/Toolchain/BuildFuseExt2.sh
Brian Gianforcaro f558a44610 Toolchain: Make BuildFuseExt2.sh shellcheck compliant
BuildFuseExt2.sh was saying it should be run under /bin/sh but it is
using bash extensions like pushd/popd, ${BASH_SOURCE[0]}, etc. So just
run it under bash to avoid any potential issues.
2021-05-05 21:26:37 +02:00

30 lines
634 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 )"
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