Last active
January 3, 2016 05:29
-
-
Save amercier/8415763 to your computer and use it in GitHub Desktop.
bash <(curl -# -L https://gist.github.com/amercier/8415763/raw)
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
#!/usr/bin/env bash | |
if [ "`whoami`" != "root" ]; then | |
echo "You must execute this script as root" >&2 | |
exit 1 | |
fi | |
VERSION=1.9.0 | |
echo ".------------------." | |
echo "| Git installation |" | |
echo "'------------------'" | |
cd \ | |
&& aptitude install make libcurl4-gnutls-dev libexpat1-dev gettext libz-dev libssl-dev asciidoc \ | |
&& curl -# https://git-core.googlecode.com/files/git-$VERSION.tar.gz -o git-$VERSION.tar.gz \ | |
&& tar xvfz git-$VERSION.tar.gz \ | |
&& cd git-$VERSION \ | |
&& make prefix=/usr/local all \ | |
&& make prefix=/usr/local install \ | |
&& cp contrib/credential/netrc/git-credential-netrc /usr/local/libexec/git-core/ \ | |
&& cp contrib/diffall/git-diffall /usr/local/libexec/git-core/ \ | |
&& cd ~/git-$VERSION/contrib/subtree \ | |
&& make prefix=/usr/local install \ | |
&& make prefix=/usr/local install-doc \ | |
&& cd \ | |
&& rm -Rf git-$VERSION git-$VERSION.tar.gz \ | |
&& echo ".----------------------------." \ | |
&& echo "| Git installed successfully |" \ | |
&& echo "'----------------------------'" \ | |
&& git --version |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment