git-lfs/script/build-git
brian m. carlson cefbabe6f5
script/build-git: try harder to fix Homebrew
For an unknown reason, sometimes libintl.h is missing on macOS when it
should not be.  Try harder to fix this by reinstalling the packages
which are already allegedly installed and forcing an unlink and re-link.
2019-10-24 18:54:53 +00:00

32 lines
690 B
Bash
Executable File

#!/bin/sh -ex
DIR="$1"
case $(uname -s) in
Darwin)
brew install curl zlib pcre2 gettext openssl
brew reinstall curl zlib pcre2 gettext openssl
for i in curl zlib pcre2 gettext openssl
do
brew unlink $i || true;
brew link --force $i || true
done;;
Linux)
export DEBIAN_FRONTEND=noninteractive
sed -e 's/^deb/deb-src/' /etc/apt/sources.list | sudo tee /etc/apt/sources.list.d/src.list
sudo apt-get update
sudo apt-get install build-essential
sudo apt-get -y build-dep git;;
esac
cd "$DIR"
printf "%s\n" \
"NO_OPENSSL=YesPlease" \
"prefix=/usr/local" \
> config.mak
make -j2
sudo make install
echo "Git version:"
git --version