helm/install/git

28 lines
599 B
Plaintext
Raw Normal View History

#!/bin/zsh
2013-03-16 21:16:00 -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
echoh "==> Git: Installing"
brew install git | indent
2013-03-16 21:16:00 -07:00
fi
if [ ! -e /usr/local/bin/branch ]; then
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
echoh "==> Git: Setting up symlinks"
2013-03-16 21:16:00 -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
echoh "==> Git: DONE!"