38 lines
772 B
Bash
Executable file
38 lines
772 B
Bash
Executable file
#!/bin/zsh
|
|
|
|
if [ ! `command -v "brew"` ]; then
|
|
echo "Homebrew is required!"
|
|
exit
|
|
fi
|
|
|
|
if [ ! `command -v "mvim"` ]; then
|
|
echo
|
|
echo "* Installing macvim"
|
|
brew install macvim --with-cscope --override-system-vim
|
|
fi
|
|
|
|
if [ ! -e ~/.vimrc ]; then
|
|
echo
|
|
echo "* Installing vim rcfiles"
|
|
|
|
if [ -d ~/.vim ]; then
|
|
rm -rf ~/.vim
|
|
fi
|
|
sh <(curl https://raw.github.com/hlissner/mlvim/master/install.sh -L)
|
|
fi
|
|
|
|
echo
|
|
echo "* Updating vim..."
|
|
vim +BundleInstall! +BundleClean! +q +q
|
|
|
|
if [ -d ~/.vim/bundle/YouCompleteMe ] && [ ! -e ~/.vim/bundle/YouCompleteMe/python/ycm_core.so ]; then
|
|
echo
|
|
echo "* Trying to compile YCM"
|
|
brew install cmake
|
|
cd ~/.vim/bundle/YouCompleteMe
|
|
./install.sh --clang-completer
|
|
fi
|
|
|
|
echo
|
|
echo "Done!"
|