#!/bin/bash
# pre ubuntu 12: git-core instead of git
set -e  # exit on any error
sudo apt-get --assume-yes build-dep git
sudo apt-get --assume-yes install libssl-dev xmlto
latest_git_version=$(git ls-remote --tags git://git.kernel.org/pub/scm/git/git.git | tail -n 1 | sed 's@.*refs/tags/\(.*\)\^{}@\1@') && echo ${latest_git_version}
cd /tmp
wget -O git-${latest_git_version}.tar.gz https://github.com/git/git/tarball/v${latest_git_version}
tar xzf git-${latest_git_version}.tar.gz
cd git-git-*
sudo make prefix=/usr/local install install-doc


#!/bin/bash
# pre ubuntu 12: git-core instead of git
set -e  # exit on any error
sudo apt-get --assume-yes build-dep git
sudo apt-get --assume-yes install libssl-dev xmlto
latest_git_version=$(curl -s http://git-scm.com/ | grep "class='version'" | perl -pe 's/.*?([0-9\.]+)<.*/$1/') && echo ${latest_git_version}
cd /tmp
wget -O git-${latest_git_version}.tar.gz https://github.com/git/git/tarball/v${latest_git_version}
tar xzf git-${latest_git_version}.tar.gz
cd git-git-*
sudo make prefix=/usr/local install install-doc


Revert "use Jefromi's way to get latest_git_version"
Revert "use Jefromi's way to get latest_git_version"

This reverts commit 630faa3de1c399f7b5c5825a20c9775239749d3c.
