Created
November 2, 2014 07:06
-
-
Save closer/f47e070c43025471106c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Install Homebrew | |
if [ ! /usr/local ]; then | |
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
fi | |
COMMANDS=( git hub go zsh tmux ) | |
for cmd in ${COMMANDS[@]}; do | |
if ! type $cmd > /dev/null 2>&1; then | |
echo "install $cmd" | |
brew install $cmd | |
fi | |
done | |
GO_COMMANDS=( ghq peco ) | |
export GOPATH=$HOME | |
for cmd in ${GO_COMMANDS[@]}; do | |
if ! type $cmd > /dev/null 2>&1; then | |
echo "install $cmd" | |
go get $cmd | |
fi | |
done | |
DROPBOX_FILES=( ssh gitconfig.local) | |
for file in ${DROPBOX_FILES[@]}; do | |
if [ ! $HOME/.$file ]; then | |
echo $file | |
ln -s $HOME/Dropbox/config/_$file $HOME/.$file | |
fi | |
done | |
DOTFILESPATH=$GOPATH/github.com/closer/dotfiles | |
if [ ! $DOTFILESPATH ]; then | |
ghq get closer/dotfiles | |
fi | |
DOT_FILES=( bundle gemrc gitignore neobundlerc vimenc zshenv gitconfig tmux.conf vimrc zshrc ) | |
for file in ${DOT_FILES[@]}; do | |
if [ ! $HOME/.$file ]; then | |
echo $file | |
ln -s $DOTFILESPATH/_$file $HOME/.$file | |
fi | |
done | |
if [ ! ~/.tmux/plugins ]; then | |
mkdir -p ~/.tmux/plugins | |
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm | |
/usr/bin/env ~/.tmux/plugins/tpm/tpm | |
fi | |
if [ ! ~/.vim/bundle ]; then | |
mkdir -p ~/.vim/bundle | |
git clone git://github.com/Shougo/neobundle.vim ~/.vim/bundle/neobundle.vim | |
/usr/bin/env ~/.vim/bundle/neobundle.vim/bin/neoinstall | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment