aboutsummaryrefslogtreecommitdiff
path: root/install
diff options
context:
space:
mode:
Diffstat (limited to 'install')
-rwxr-xr-xinstall10
1 files changed, 9 insertions, 1 deletions
diff --git a/install b/install
index 350d676..0768586 100755
--- a/install
+++ b/install
@@ -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) "