2013-03-16 21:16:00 -07:00
|
|
|
#!/bin/zsh
|
|
|
|
|
|
|
|
if [ ! `command -v "brew"` ]; then
|
|
|
|
echo "Homebrew is required!"
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
2013-03-16 21:28:28 -07:00
|
|
|
if [ ! `command -v "mvim"` ]; then
|
2013-03-16 23:30:13 -07:00
|
|
|
echo
|
|
|
|
echo "* Installing macvim"
|
2013-03-16 21:28:28 -07:00
|
|
|
brew install macvim --with-cscope --override-system-vim
|
|
|
|
fi
|
|
|
|
|
2013-03-16 21:31:04 -07:00
|
|
|
if [ ! -e ~/.vimrc ]; then
|
2013-03-16 23:30:13 -07:00
|
|
|
echo
|
|
|
|
echo "* Installing vim rcfiles"
|
2013-03-16 21:28:28 -07:00
|
|
|
|
|
|
|
if [ -d ~/.vim ]; then
|
|
|
|
rm -rf ~/.vim
|
|
|
|
fi
|
|
|
|
sh <(curl https://raw.github.com/hlissner/mlvim/master/install.sh -L)
|
|
|
|
fi
|
2013-03-16 21:16:00 -07:00
|
|
|
|
2013-03-16 23:30:13 -07:00
|
|
|
echo
|
|
|
|
echo "* Updating vim..."
|
2013-03-16 21:28:28 -07:00
|
|
|
vim +BundleInstall! +BundleClean! +q +q
|
2013-03-16 21:16:00 -07:00
|
|
|
|
2013-03-16 22:06:05 -07:00
|
|
|
if [ -d ~/.vim/bundle/YouCompleteMe ] && [ ! -e ~/.vim/bundle/YouCompleteMe/python/ycm_core.so ]; then
|
2013-03-16 23:30:13 -07:00
|
|
|
echo
|
|
|
|
echo "* Trying to compile YCM"
|
2013-03-16 21:49:58 -07:00
|
|
|
brew install cmake
|
|
|
|
cd ~/.vim/bundle/YouCompleteMe
|
|
|
|
./install.sh --clang-completer
|
|
|
|
fi
|
|
|
|
|
2013-03-16 23:30:13 -07:00
|
|
|
echo
|
|
|
|
echo "Done!"
|