helm/install/git
2013-03-17 02:30:13 -04:00

34 lines
605 B
Bash
Executable file

#!/bin/bash
echo "[GIT]"
if [ ! `command -v "git"` ]; then
if [ ! `command -v "brew"` ]; then
echo "Homebrew is required!"
exit
fi
echo
echo "* Installing git"
brew install git
fi
if [ ! -e /usr/local/bin/branch ]; then
echo
echo "* Install git-friendly"
# https://github.com/jamiew/git-friendly
bash < <(curl https://raw.github.com/jamiew/git-friendly/master/install.sh)
fi
# Create links
echo
echo "* Setting up symlinks"
src=$(cd "$(dirname "$0")"; pwd)
ln -sf $src/gitignore ~/.gitignore
ln -sf $src/gitconfig ~/.gitconfig
echo
echo "Done!"