Created
September 15, 2015 12:08
-
-
Save bootleq/0082225915fb4b866977 to your computer and use it in GitHub Desktop.
Install git from source
This file contains hidden or 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
#!/bin/bash | |
if which apt-get 2>&1 >/dev/null; then | |
sudo apt-get install -y libcurl4-gnutls-dev libexpat1-dev gettext libz-dev libssl-dev | |
fi | |
cd ~/src | |
[[ ! -d git ]] && git clone https://github.com/git/git --depth 10 | |
cd git | |
git fetch origin v2.5.0 --depth 1 | |
git checkout FETCH_HEAD | |
make prefix=/usr/local all | |
sudo make prefix=/usr/local install |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This script clone git to
~/src
, checkout v2.5.0 and install to/usr/local
.