Last active
January 23, 2017 02:02
-
-
Save sinwoobang/1f8dccbd8c91de585869e44da1aeb938 to your computer and use it in GitHub Desktop.
Install/Update the latest git version for ubuntu 11.04
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
#!/bin/bash | |
# A script to install/update the latest version git for ubuntu 11.04. | |
# Author : Sin-Woo Bang | |
# Initial version 2016.09.22 | |
printf '*** apt-get update\n' | |
sudo apt-get update | |
# install `make` | |
printf '*** Install `make`.\n' | |
sudo apt-get install make | |
# install dependencies. | |
printf '*** Install dependencies.\n' | |
sudo apt-get install curl | |
sudo apt-get install libcurl4-gnutls-dev | |
sudo apt-get install gettext | |
# mkdir ~/clonedgit/ if not exists. | |
printf '*** mkdir if not exists.\n' | |
sudo mkdir -p ~/clonedgit/ | |
sudo chown USERNAME:USERNAME -R ~/clonedgit/ | |
# clone the latest version `git`. | |
printf '*** git clone from `github.com/git/git`.\n' | |
git clone https://github.com/git/git.git ~/clonedgit/git | |
# make install | |
printf '*** Make prefix=/usr install.\n' | |
cd /var/data/lib/git | |
sudo make prefix=/usr install | |
printf "\n\nSuccess, now %s\n\n" "$(git --version)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
NOTE : Change USERNAME to yours at L23.