Created
December 13, 2013 17:08
-
-
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.
This file contains hidden or 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
#!/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