Merge pull request #127 from jokerkeny/patch-1

Update install.sh
This commit is contained in:
chxuan 2019-04-03 21:17:24 +08:00 committed by GitHub
commit c7e419646f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -31,6 +31,18 @@ function is_ubuntu1604()
fi fi
} }
# 判断是否是Debian版本
function is_debian()
{
version=$(lsb_release -is)
if [ "${version}" == "Debian" ]; then
echo 1
else
echo 0
fi
}
# 在ubuntu上源代码安装vim # 在ubuntu上源代码安装vim
function compile_vim_on_ubuntu() function compile_vim_on_ubuntu()
{ {
@ -114,13 +126,18 @@ function install_prepare_software_on_centos()
# 安装ubuntu发行版必要软件 # 安装ubuntu发行版必要软件
function install_prepare_software_on_ubuntu() function install_prepare_software_on_ubuntu()
{ {
sudo apt-get install -y ctags build-essential cmake python-dev python3-dev fontconfig curl libfile-next-perl ack-grep sudo apt-get update
sudo apt-get install -y ctags build-essential cmake python python-dev python3-dev fontconfig curl libfile-next-perl ack-grep
ubuntu_1604=`is_ubuntu1604` ubuntu_1604=`is_ubuntu1604`
debian=`is_debian`
echo ${ubuntu_1604} echo ${ubuntu_1604}
if [ ${ubuntu_1604} == 1 ]; then if [ ${ubuntu_1604} == 1 ]; then
echo "Ubuntu 16.04 LTS" echo "Ubuntu 16.04 LTS"
compile_vim_on_ubuntu compile_vim_on_ubuntu
elif [ ${debian} == 1 ]; then
echo "Debian"
compile_vim_on_ubuntu
else else
echo "Not ubuntu 16.04 LTS" echo "Not ubuntu 16.04 LTS"
sudo apt-get install -y vim sudo apt-get install -y vim