2013-03-21 00:07:56 -07:00
|
|
|
#!/bin/zsh
|
2013-03-16 21:16:00 -07:00
|
|
|
|
2013-03-21 00:07:56 -07:00
|
|
|
if ! command-exists git; then
|
|
|
|
if ! command-exists brew; then
|
2013-03-16 21:16:00 -07:00
|
|
|
echo "Homebrew is required!"
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
2013-03-21 00:07:56 -07:00
|
|
|
echoh "==> Git: Installing"
|
|
|
|
brew install git | indent
|
2013-03-16 21:16:00 -07:00
|
|
|
fi
|
|
|
|
|
|
|
|
if [ ! -e /usr/local/bin/branch ]; then
|
2013-03-21 00:07:56 -07:00
|
|
|
echoh "==> Git: Installing git-friendly"
|
2013-03-16 21:16:00 -07:00
|
|
|
|
|
|
|
# https://github.com/jamiew/git-friendly
|
|
|
|
bash < <(curl https://raw.github.com/jamiew/git-friendly/master/install.sh)
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Create links
|
2013-03-21 00:07:56 -07:00
|
|
|
echoh "==> Git: Setting up symlinks"
|
2013-03-16 21:16:00 -07:00
|
|
|
|
2013-03-21 00:07:56 -07:00
|
|
|
src=$(cd "$(dirname "$0")/.."; pwd)
|
2013-03-16 21:16:00 -07:00
|
|
|
ln -sf $src/gitignore ~/.gitignore
|
|
|
|
ln -sf $src/gitconfig ~/.gitconfig
|
|
|
|
|
2013-03-21 00:07:56 -07:00
|
|
|
echoh "==> Git: DONE!"
|