-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·40 lines (34 loc) · 949 Bytes
/
install.sh
File metadata and controls
executable file
·40 lines (34 loc) · 949 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/bash
if [[ $(id -u) -eq 0 ]]; then
echo -e "\n[ERROR] Can not run as root\n"
exit 1
fi
echo ">>> Install vim and config dependency packages:"
ubuntu_ver_major=$(lsb_release -rs 2>/dev/null | awk -F . '{print $1}')
echo "ubuntu_ver_major=${ubuntu_ver_major}"
if [[ ${ubuntu_ver_major} -le 22 ]]; then
sudo add-apt-repository ppa:jonathonf/vim
fi
sudo apt update
sudo apt install -y vim \
neovim \
exuberant-ctags \
cmake \
git \
python3 \
python-is-python3 \
python3-pip
echo -e "\n>>> Install vim config and color files:"
if [[ ! -f ~/.vimrc ]]; then
cp ./vimrc ~/.vimrc
fi
if [[ ! -d ~/.vim ]]; then
cp -r ./vimfile ~/.vim
fi
echo -e "\n>>> Install vim plugin manager: Vundle.vimfiles:"
if [[ ! -d ~/.vim/bundle/Vundle.vim ]]; then
git clone https://github.com/iamcopper/Vundle.vim.git ~/.vim/bundle/Vundle.vim
fi
echo -e "\n>>> Install vim plugins defined in vimrc"
vim -c PluginInstall -c qa
echo -e "\n>>> Done!"