helm/install/git

34 lines
608 B
Plaintext
Raw Normal View History

2013-03-16 21:16:00 -07:00
#!/bin/bash
echo "[GIT]"
if [ ! `command -v "git"` ]; then
if [ ! `command -v "brew"` ]; then
echo "Homebrew is required!"
exit
fi
2013-03-16 23:30:13 -07:00
echo
echo "* Installing git"
2013-03-16 21:16:00 -07:00
brew install git
fi
if [ ! -e /usr/local/bin/branch ]; then
2013-03-16 23:30:13 -07:00
echo
2013-03-17 13:05:01 -07:00
echo "* 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-16 23:30:13 -07:00
echo
echo "* Setting up symlinks"
2013-03-16 21:16:00 -07:00
src=$(cd "$(dirname "$0")"; pwd)
ln -sf $src/gitignore ~/.gitignore
ln -sf $src/gitconfig ~/.gitconfig
2013-03-16 23:30:13 -07:00
echo
echo "Done!"