dotfiles/install

40 lines
1 KiB
Bash
Executable file

#!/usr/bin/env bash
if [ -z "$HOME" ]; then echo "Seems you're \$HOMEless :("; exit 1; fi
DOTFILES=$HOME/.dotfiles
cd $HOME
rm -rf $DOTFILES
mkdir $DOTFILES
cd $DOTFILES
git init
git remote add origin git@github.com:joshtronic/dotfiles.git
git pull origin master
git submodule update --init --recursive
rm -rf $HOME/.gemrc $HOME/.gitconfig $HOME/.grcat $HOME/.my.cnf \
$HOME/.tmux.conf $HOME/.tmuxinator $HOME/.vim $HOME/.zshrc \
$HOME/.config/nvim
ln -s $DOTFILES/gemrc $HOME/.gemrc
ln -s $DOTFILES/gitconfig $HOME/.gitconfig
ln -s $DOTFILES/vendor/nitso/colour-mysql-console/.grcat $HOME/.grcat
ln -s $DOTFILES/my.cnf $HOME/.my.cnf
ln -s $DOTFILES/tmux.conf $HOME/.tmux.conf
ln -s $DOTFILES/tmuxinator $HOME/.tmuxinator
ln -s $DOTFILES/vim $HOME/.vim
ln -s $DOTFILES/vim $HOME/.config/nvim
ln -s $DOTFILES/zshrc $HOME/.zshrc
if [[ `uname` == 'Darwin' ]]; then
defaults write com.apple.dock autohide-delay -float 86400; killall Dock
defaults write -g ApplePressAndHoldEnabled -bool false
fi
cd $HOME
rm -f $HOME/.zcompdump*
exec zsh