-
-
Save waleedsamy/baebc5af66390425f0e4 to your computer and use it in GitHub Desktop.
Install Git from source
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
# Install Git from source | |
# usage: curl https://gist.githubusercontent.com/waleedsamy/baebc5af66390425f0e4/raw/022bc3c16d18ed918822734a310ed5443f5f5286/igit.sh > ~/igit.sh && chmod +x ~/igit.sh && ~/igit.sh | |
gitversion=${1-2.9.0} | |
if [ "$(uname)" == "Darwin" ]; then | |
echo "Do something under Mac OS X platform like installing xcode" | |
elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then | |
sudo yum -y groupinstall "Development tools" | |
sudo yum -y install wget curl-devel expat-devel gettext-devel openssl-devel perl-devel zlib-devel | |
fi | |
wget -qO- https://github.com/git/git/archive/v$gitversion.tar.gz | tar xvz && \ | |
cd ./git-$gitversion && make configure && ./configure && make && sudo make install && \ | |
cp ./contrib/completion/git-completion.bash ~ && echo "source ~/git-completion.bash" >> ~/.bashrc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment