install 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #!/bin/bash
  2. DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
  3. for i in $(ls "$DIR"); do
  4. if [ "$i" != "install" ] && [ "$i" != "UpdateVimPlugins" ] && [ "$i" != "README.md" ]; then
  5. if [ -e "$HOME/.$i" ]; then
  6. read -p "$HOME/.$i exists! Delete? [y/N] " -n 1 -r
  7. if [[ $REPLY =~ ^[Yy]$ ]]; then
  8. #probably would be better to explicitly check
  9. #if directory before -r and -n
  10. rm -rf "$HOME/.$i"
  11. ln -sn "$DIR/$i" "$HOME/.$i"
  12. fi
  13. echo ""
  14. else
  15. ln -sn "$DIR/$i" "$HOME/.$i"
  16. fi
  17. fi
  18. done
  19. git submodule update --init --recursive
  20. git submodule foreach git pull origin master
  21. ln -fsn "$DIR"/vim/pathogen/autoload "$DIR"/vim/
  22. mkdir -p "$HOME"/.local/share/vim/{backup,swap,undo}
  23. #Very specific to Arch
  24. yaourt -S boost python-powerline-git
  25. echo "Compiling YouCompleteMe"
  26. cd "$DIR"/vim/bundle/YouCompleteMe
  27. ./install.sh
  28. read -p "Auto install exuberant-ctags? [y/N] " -n 1 -r
  29. if [[ $REPLY =~ ^[Yy]$ ]]; then
  30. echo ""
  31. git clone git://github.com/jakedouglas/exuberant-ctags.git "$HOME"/exuberant-ctags
  32. cd "$HOME"/exuberant-ctags
  33. ./configure
  34. make
  35. sudo make install
  36. rm -rf "$HOME"/exuberant-ctags
  37. fi
  38. echo ""