28 lines
		
	
	
		
			599 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable file
		
	
	
	
	
			
		
		
	
	
			28 lines
		
	
	
		
			599 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable file
		
	
	
	
	
#!/bin/zsh
 | 
						|
 | 
						|
if ! command-exists git; then
 | 
						|
    if ! command-exists brew; then
 | 
						|
        echo "Homebrew is required!"
 | 
						|
        exit
 | 
						|
    fi
 | 
						|
 | 
						|
    echoh "==> Git: Installing"
 | 
						|
    brew install git | indent
 | 
						|
fi
 | 
						|
 | 
						|
if [ ! -e /usr/local/bin/branch ]; then
 | 
						|
    echoh "==> 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
 | 
						|
echoh "==> Git: Setting up symlinks"
 | 
						|
 | 
						|
src=$(cd "$(dirname "$0")/.."; pwd)
 | 
						|
ln -sf $src/gitignore ~/.gitignore
 | 
						|
ln -sf $src/gitconfig ~/.gitconfig
 | 
						|
 | 
						|
echoh "==> Git: DONE!"
 |