Skip to content

Instantly share code, notes, and snippets.

@dacamo76
Created December 13, 2013 17:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dacamo76/7947595 to your computer and use it in GitHub Desktop.
Save dacamo76/7947595 to your computer and use it in GitHub Desktop.
Updates Git. Always stay on master branch. Install Git from source. Clone git/git repository from GitHub. Install Git from cloned repo. Remove old version of Git.
#!/usr/bin/env bash
prefix=~/opt
function compile {
make clean
make prefix=${prefix}
make prefix=${prefix} install
}
cd master
git checkout master -q
git clean -dxfq
git pull | grep "Already up-to-date" || compile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment