diff options
author | Karel Kočí <karel.koci@nic.cz> | 2017-02-15 09:21:05 +0100 |
---|---|---|
committer | Karel Kočí <karel.koci@nic.cz> | 2017-02-15 09:21:05 +0100 |
commit | 992dd260effb73d6150e1b4c9f5239b217c4738a (patch) | |
tree | b7998481ac32fcf03c14d288c44e5e93dc3e8f29 | |
parent | 6770b51f4982b67f230ead55798574ca7e589f6f (diff) | |
download | myconfigs-992dd260effb73d6150e1b4c9f5239b217c4738a.tar.gz myconfigs-992dd260effb73d6150e1b4c9f5239b217c4738a.tar.bz2 myconfigs-992dd260effb73d6150e1b4c9f5239b217c4738a.zip |
Automatically recompile YCM
-rwxr-xr-x | install | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -40,13 +40,21 @@ if [[ $REPLY =~ ^[Yy]?$ ]]; then fi read -p "Install VIM scripts? (Y/n) " +YCM_PATH=~/.vim/bundle/YouCompleteMe if [[ $REPLY =~ ^[Yy]?$ ]]; then + YCM_REV="$(cd $YCM_PATH && git --work-tree=. rev-parse HEAD)" inst vimrc ~/.vimrc inst vim/ ~/.vim inst local/bin/vim-project-gen ~/.local/bin/vim-project-gen mkdir -p ~/.cache/vim # directory for *.swp files mkdir -p ~/.cache/vim-undo # directory for undo files - echo "Please don't forget to setup YouCompleteMe" + # Check if YCM was updated and if so recompile + if [ "$YCM_REV" != "$(cd $YCM_PATH && git --work-tree=. rev-parse HEAD)" ]; then ( + cd ~/.vim/bundle/YouCompleteMe + ./install.py --clang-completer --system-libclang --racer-completer + ); else + echo "YouCompleteMe is not required to be recompiled" + fi fi read -p "Install ranger configuration? (Y/n) " |