Skip to content

Commit

Permalink
add for FreeBSD support
Browse files Browse the repository at this point in the history
  • Loading branch information
ardinzh committed Nov 4, 2020
1 parent cf184d5 commit b227556
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .ycm_extra_conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@
'-isystem',
'/usr/include/c++/9.3.0',
'-isystem',
'/usr/include/c++/10.2.0',
'-isystem',
'/usr/include',
'-isystem',
'/usr/include/x86_64-linux-gnu',
Expand Down
22 changes: 21 additions & 1 deletion install.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# 获取linux发行版名称
function get_linux_distro()
Expand All @@ -7,6 +7,8 @@ function get_linux_distro()
echo "Ubuntu"
elif grep -Eq "Deepin" /etc/*-release; then
echo "Deepin"
elif grep -Eq "Raspbian" /etc/*-release; then
echo "Raspbian"
elif grep -Eq "uos" /etc/*-release; then
echo "UOS"
elif grep -Eq "LinuxMint" /etc/*-release; then
Expand Down Expand Up @@ -250,6 +252,12 @@ function install_prepare_software_on_mac()
fi
}

# 安装FreeBSD必备软件
function install_prepare_software_on_freebsd()
{
sudo pkg install -y vim ctags automake gcc cmake p5-ack python git fontconfig
}

# 安装android平台必备软件
function install_prepare_software_on_android()
{
Expand Down Expand Up @@ -481,6 +489,14 @@ function install_vimplus_on_mac()
print_logo
}

# 在FreeBSD上安装vimplus
function install_vimplus_on_freebsd()
{
backup_vimrc_and_vim
install_prepare_software_on_freebsd
begin_install_vimplus
}

# 在android平台安装vimplus
function install_vimplus_on_android()
{
Expand Down Expand Up @@ -583,6 +599,8 @@ function install_vimplus_on_linux()
install_vimplus_on_ubuntu_like
elif [ ${distro} == "Debian" ]; then
install_vimplus_on_debian
elif [ ${distro} == "Raspbian" ]; then
install_vimplus_on_debian
elif [ ${distro} == "UOS" ]; then
install_vimplus_on_debian
elif [ ${distro} == "Kali" ]; then
Expand Down Expand Up @@ -621,6 +639,8 @@ function main()

if [ ${type} == "Darwin" ]; then
install_vimplus_on_mac
elif [ ${type} == "FreeBSD" ]; then
install_vimplus_on_freebsd
elif [ ${type} == "Linux" ]; then
tp=$(uname -a)
if [[ $tp =~ "Android" ]]; then
Expand Down

0 comments on commit b227556

Please sign in to comment.