install 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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. echo "Installing boost and powerline"
  25. yaourt -S boost python2-powerline-git
  26. echo "Compiling YouCompleteMe"
  27. cd "$DIR"/vim/bundle/YouCompleteMe
  28. ./install.sh
  29. read -p "Auto install exuberant-ctags? [y/N] " -n 1 -r
  30. if [[ $REPLY =~ ^[Yy]$ ]]; then
  31. echo ""
  32. git clone git://github.com/jakedouglas/exuberant-ctags.git "$HOME"/exuberant-ctags
  33. cd "$HOME"/exuberant-ctags
  34. ./configure
  35. make
  36. sudo make install
  37. rm -rf "$HOME"/exuberant-ctags
  38. fi
  39. echo ""