Skip to content

Commit e84d447

Browse files
authored
Merge pull request #87 from TTWShell/fix/brew-use
Fix/brew use
2 parents c3b595d + fcd1cd2 commit e84d447

File tree

4 files changed

+14
-11
lines changed

4 files changed

+14
-11
lines changed

.travis.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ os:
66
- linux
77
- osx
88

9+
before_install:
10+
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi
11+
912
install:
1013
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install -y clang golang; fi
1114
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export CXX="g++-4.9" CC="gcc-4.9" GOROOT="/usr/lib/go" GOPATH=$HOME/gocode PATH=$PATH:$GOPATH/bin; fi

install-plugins.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,32 +3,32 @@
33
function install {
44
ln -s -f `pwd`/vimrc $HOME/.vimrc
55
touch $HOME/.vimrc.local
6-
yes "\n" | sudo vim +PluginClean +qall
7-
yes "\n" | sudo vim +PluginInstall +qall
6+
yes "" | vim +PluginClean +qall
7+
yes "" | vim +PluginInstall +qall
88
}
99

1010
function update {
11-
yes "\n" | sudo vim +PluginUpdate +qall
11+
yes "" | vim +PluginUpdate +qall
1212
}
1313

1414
function init {
1515
echo ">>> Set up Vundle ..."
16-
sudo rm -rf ~/.vim/bundle/Vundle.vim
17-
sudo git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
16+
rm -rf ~/.vim/bundle/Vundle.vim
17+
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
1818

1919
pip install flake8 # for vim-flake8
2020

2121
install
2222

23-
sudo mkdir -p ~/.vim/colors && sudo cp ~/.vim/bundle/vim-colorschemes/colors/* ~/.vim/colors
23+
mkdir -p ~/.vim/colors && cp ~/.vim/bundle/vim-colorschemes/colors/* ~/.vim/colors
2424

2525
rebuild --gocode-completer
2626
}
2727

2828
function rebuild() {
2929
set -e
3030
set -o pipefail
31-
cd ~/.vim/bundle/YouCompleteMe && git submodule update --init --recursive && sudo ./install.py "$@"
31+
cd ~/.vim/bundle/YouCompleteMe && git submodule update --init --recursive && ./install.py "$@"
3232
}
3333

3434
function usage {

install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,6 @@ case $platform in
5454
;;
5555
esac
5656

57-
sudo bash install-plugins.sh init
57+
bash install-plugins.sh init
5858

5959
echoo "Install finished. If you need orther language support, please run: ./install-plugins.sh --help"

scripts/init-vim-osx.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ function echoo {
55
}
66

77
echoo ">>> Install cmake using brew ..."
8-
brew install cmake
8+
brew list cmake &>/dev/null || brew install cmake
99

1010
echoo ">>> Install golang using brew ..."
11-
brew install golang
11+
brew list golang &>/dev/null || brew install golang
1212

1313
echoo ">>> Install vim using brew ..."
14-
brew install vim
14+
brew list vim &>/dev/null || brew install vim

0 commit comments

Comments
 (0)