Skip to content

Commit

Permalink
fix install bug
Browse files Browse the repository at this point in the history
  • Loading branch information
chxuan committed Aug 12, 2018
1 parent 6a7e788 commit 679b7a0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 18 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ An automatic configuration program for vim
```bash
git clone https://github.com/chxuan/vimplus.git ~/.vimplus
cd ~/.vimplus
sudo ./install.sh
./install.sh
```

### Centos
Expand All @@ -48,7 +48,7 @@ An automatic configuration program for vim
```bash
git clone https://github.com/chxuan/vimplus.git ~/.vimplus
cd ~/.vimplus
sudo ./install.sh
./install.sh
```

### ArchLinux
Expand Down
19 changes: 3 additions & 16 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ function compile_vim_on_ubuntu()
{
sudo apt-get remove -y vim vim-runtime gvim
sudo apt-get remove -y vim-tiny vim-common vim-gui-common vim-nox
sudo rm -rf ~/vim
sudo rm -rf /usr/bin/vim*
sudo rm -rf /usr/local/bin/vim*
sudo rm -rf /usr/share/vim/vim*
sudo rm -rf /usr/local/share/vim/vim*
rm -rf ~/vim

sudo apt-get install -y libncurses5-dev libgnome2-dev libgnomeui-dev \
libgtk2.0-dev libatk1.0-dev libbonoboui2-dev \
Expand All @@ -66,12 +66,12 @@ function compile_vim_on_ubuntu()
# 在centos上源代码安装vim
function compile_vim_on_centos()
{
sudo rm -rf ~/vim
sudo rm -rf /usr/bin/vi
sudo rm -rf /usr/bin/vim*
sudo rm -rf /usr/local/bin/vim*
sudo rm -rf /usr/share/vim/vim*
sudo rm -rf /usr/local/share/vim/vim*
rm -rf ~/vim

sudo yum install -y ruby ruby-devel lua lua-devel luajit \
luajit-devel ctags git python python-devel \
Expand Down Expand Up @@ -193,7 +193,7 @@ function compile_ycm_on_mac()
function compile_ycm_on_linux()
{
cd ~/.vim/plugged/YouCompleteMe
sudo ./install.py --clang-completer
./install.py --clang-completer
}

# 打印logo
Expand All @@ -216,18 +216,6 @@ function print_logo()
printf "${normal}"
}

# 改变一些文件、文件夹属组和用户关系
function chown_dir()
{
who_is=$(who)
current_user=${who_is%% *}
sudo chown -R ${current_user}:${current_user} ~/.vim
sudo chown -R ${current_user}:${current_user} ~/.fonts
sudo chown -R ${current_user}:${current_user} ~/.cache
sudo chown ${current_user}:${current_user} ~/.vimrc.local
sudo chown ${current_user}:${current_user} ~/.viminfo
}

# 在mac平台安装vimplus
function install_vimplus_on_mac()
{
Expand All @@ -247,7 +235,6 @@ function begin_install_vimplus()
download_vim_plug
install_vim_plugin
compile_ycm_on_linux
chown_dir
print_logo
}

Expand Down

0 comments on commit 679b7a0

Please sign in to comment.