Skip to content

Instantly share code, notes, and snippets.

@sinwoobang
Last active January 23, 2017 02:02
Show Gist options
  • Save sinwoobang/1f8dccbd8c91de585869e44da1aeb938 to your computer and use it in GitHub Desktop.
Save sinwoobang/1f8dccbd8c91de585869e44da1aeb938 to your computer and use it in GitHub Desktop.
Install/Update the latest git version for ubuntu 11.04
#!/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)"
@sinwoobang
Copy link
Author

sinwoobang commented Sep 22, 2016

NOTE : Change USERNAME to yours at L23.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment