2017-12-18 16:53:43 +00:00
|
|
|
#!/bin/sh
|
|
|
|
set -e
|
2016-04-04 02:51:34 +00:00
|
|
|
|
2017-12-18 16:53:43 +00:00
|
|
|
############################
|
|
|
|
## Check for dependencies ##
|
|
|
|
############################
|
|
|
|
error() { >&2 printf "Error: %s" "$1"; exit 1; }
|
|
|
|
|
|
|
|
which cmake >/dev/null 2>&1 || error 'cmake is not installed'
|
|
|
|
which clang >/dev/null 2>&1 || error 'clang is not installed'
|
|
|
|
which python >/dev/null 2>&1 || error 'python is not installed'
|
|
|
|
|
|
|
|
[ -z "$VIMDIR" ] && error '$VIMDIR is not set'
|
2016-05-21 11:45:23 +00:00
|
|
|
|
2016-04-04 02:51:34 +00:00
|
|
|
#######################
|
|
|
|
## Initialise Vundle ##
|
|
|
|
#######################
|
2017-12-18 16:53:43 +00:00
|
|
|
mkdir -p "$VIMDIR/bundle" "$VIMDIR/swapfiles"
|
|
|
|
if [ ! -d "$VIMDIR/bundle/Vundle.vim" ]; then
|
|
|
|
git clone https://github.com/VundleVim/Vundle.vim.git "$VIMDIR/bundle/Vundle.vim"
|
|
|
|
fi
|
2017-07-14 13:15:48 +00:00
|
|
|
vim +PluginUpdate +qall
|
2016-04-04 02:51:34 +00:00
|
|
|
|
|
|
|
#########################
|
|
|
|
## Setup YouCompleteMe ##
|
|
|
|
#########################
|
2017-12-18 16:53:43 +00:00
|
|
|
cd "$VIMDIR/bundle/YouCompleteMe"
|
2016-10-14 21:42:03 +00:00
|
|
|
git submodule update --init --recursive
|
2018-04-20 22:58:53 +00:00
|
|
|
./install.py --system-libclang --clang-completer --go-completer --rust-completer --js-completer --java-completer
|