From e7086db0959d70e51cb04d8821d6b8b13ebf8878 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Sat, 25 Feb 2017 19:30:37 +0100 Subject: Update the way git repositories are handled --- install | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'install') diff --git a/install b/install index 0768586..ceee9be 100755 --- a/install +++ b/install @@ -42,15 +42,15 @@ 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)" + # See if we have anything different from what we have in repository + YCM_REV="$(cd $YCM_PATH && git --work-tree=. diff --exit-code -s && echo y)" 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 - # 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 + if [ "$YCM_REV" != "y" ]; then ( + cd $YCM_PATH ./install.py --clang-completer --system-libclang --racer-completer ); else echo "YouCompleteMe is not required to be recompiled" -- cgit v1.2.3