26 lines
572 B
Bash
Executable file
26 lines
572 B
Bash
Executable file
#!/bin/zsh
|
|
|
|
if ! command-exists git; then
|
|
if ! command-exists brew; then
|
|
echo "Homebrew is required!"
|
|
exit
|
|
fi
|
|
|
|
echo "==> Git: Installing"
|
|
brew install git | indent
|
|
fi
|
|
|
|
if [ ! -e /usr/local/bin/branch ]; then
|
|
echo "==> Git: Installing git-friendly"
|
|
|
|
# https://github.com/jamiew/git-friendly
|
|
bash < <(curl https://raw.github.com/jamiew/git-friendly/master/install.sh)
|
|
fi
|
|
|
|
# Create links
|
|
echo "==> Git: Setting up symlinks"
|
|
ln -sf ~/.dotfiles/gitignore ~/.gitignore
|
|
ln -sf ~/.dotfiles/gitconfig ~/.gitconfig
|
|
|
|
echo "==> Git: DONE!"
|