Last active
March 31, 2018 08:12
-
-
Save gschizas/cc40970bce2c77898ad416808449dcd8 to your computer and use it in GitHub Desktop.
Build and install git from sources
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
ver=$(curl https://api.github.com/repos/git/git/tags | jq -r 'first(.[].name | select(test("v\\d\\.\\d+\\.\\d+$")))[1:]') | |
sudo apt install -y \ | |
dh-autoreconf libcurl4-gnutls-dev libexpat1-dev \ | |
gettext zlib1g-dev libssl1.0-dev \ | |
asciidoc xmlto docbook2x | |
# getopt | |
wget -c https://github.com/git/git/archive/v$ver.tar.gz -O git-$ver.tar.gz | |
tar -xzvf git-$ver.tar.gz | |
cd git-$ver/ | |
make configure | |
./configure --prefix=/usr | |
make all doc info | |
sudo make install install-doc install-html install-info |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment