install.sh 477 B

1234567891011121314151617181920212223242526
  1. #!/usr/bin/env bash
  2. set -euo pipefail
  3. DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
  4. if ! which git >/dev/null; then
  5. echo "Error: git is not installed"
  6. exit 1
  7. fi
  8. # git
  9. git -C $DIR submodule update --init
  10. ln -sf $DIR/gitconfig ~/.gitconfig
  11. # bash
  12. ln -sf $DIR/bashrc ~/.bashrc
  13. # tmux
  14. ln -sf $DIR/tmux.conf ~/.tmux.conf
  15. # vim
  16. if which vim >/dev/null; then
  17. ln -sfT $DIR/vim ~/.vim
  18. ln -sf $DIR/vimrc ~/.vimrc
  19. vim +PluginClean! +PluginInstall +qall
  20. fi