1
0
mirror of https://github.com/sstephenson/bats.git synced 2024-12-27 06:59:45 +01:00

Fixing Bats installation on Mac OSX Mojave

This commit is contained in:
Konstantin Gredeskoul 2019-07-10 20:12:56 -07:00
parent b524cc8b57
commit b1c66391cd

View File

@ -28,10 +28,17 @@ if [ -z "$1" ]; then
fi fi
BATS_ROOT="$(abs_dirname "$0")" BATS_ROOT="$(abs_dirname "$0")"
mkdir -p "$PREFIX"/{bin,libexec,share/man/man{1,7}} echo "Installing binaries..."
cp -R "$BATS_ROOT"/bin/* "$PREFIX"/bin
cp -R "$BATS_ROOT"/libexec/* "$PREFIX"/libexec
cp "$BATS_ROOT"/man/bats.1 "$PREFIX"/share/man/man1
cp "$BATS_ROOT"/man/bats.7 "$PREFIX"/share/man/man7
echo "Installed Bats to $PREFIX/bin/bats" [[ -d "$PREFIX"/share/bats ]] || mkdir -p "$PREFIX"/share/bats
[[ -d "$PREFIX"/bin ]] || mkdir -p "$PREFIX"/bin
cp -Rv "$BATS_ROOT"/libexec/* "$PREFIX"/share/bats
for binary in $(ls -1 libexec); do
ln -svf "$PREFIX"/share/bats/${binary} "$PREFIX"/bin/${binary}
done
echo "Installed bats into ${PREFIX}/bin:"
ls -al ${PREFIX}/bin/bats*