From cf184d582752f1852128e15c44b01c8234c73741 Mon Sep 17 00:00:00 2001
From: chxuan <787280310@qq.com>
Date: Mon, 1 Jun 2020 20:54:25 +0800
Subject: [PATCH 1/2] add for Gentoo support
---
README.md | 5 ++++-
install.sh | 9 ++++-----
2 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/README.md b/README.md
index 18f4245..f2f8d39 100644
--- a/README.md
+++ b/README.md
@@ -59,6 +59,7 @@ An automatic configuration program for vim
 |
 |
+ |
@@ -311,10 +312,12 @@ An automatic configuration program for vim
-
+
+
+
## 支持开源:heart:
diff --git a/install.sh b/install.sh
index bb7a7f1..f593669 100755
--- a/install.sh
+++ b/install.sh
@@ -323,11 +323,11 @@ function install_prepare_software_on_archlinux()
# 安装gentoo必备软件
function install_prepare_software_on_gentoo()
{
- test_install_gentoo app-editors/vim dev-util/ctags sys-devel/automake sys-devel/gcc dev-util/cmake sys-apps/ack dev-vcs/git media-libs/fontconfig
+ install_software_on_gentoo app-editors/vim dev-util/ctags sys-devel/automake sys-devel/gcc dev-util/cmake sys-apps/ack dev-vcs/git media-libs/fontconfig
su - -c "ln -s /usr/lib/libtinfo.so.6 /usr/lib/libtinfo.so.5" -s /bin/bash
}
-function test_install_gentoo()
+function install_software_on_gentoo()
{
pkgs=$*
pkg_need_install=""
@@ -336,17 +336,16 @@ function test_install_gentoo()
if qlist -I | grep -Eq $pkg; then
echo "$pkg is already installed."
else
- pkg_need_install="$pkg_need_install $pkg"
+ pkg_need_install="$pkg_need_install $pkg"
fi
done
if sudo -l | grep -Eq "emerge"; then
sudo emerge -v $pkg_need_install
else
- echo "Need Root password:"
+ echo "Need Root password:"
su - -c "emerge -v $pkg_need_install" -s /bin/bash
fi
-
}
# 安装opensuse必备软件
From b22755638b486c315d0fe680eb2e19eaea8926e1 Mon Sep 17 00:00:00 2001
From: ardinzh
Date: Wed, 4 Nov 2020 12:44:24 +0800
Subject: [PATCH 2/2] add for FreeBSD support
---
.ycm_extra_conf.py | 2 ++
install.sh | 22 +++++++++++++++++++++-
2 files changed, 23 insertions(+), 1 deletion(-)
diff --git a/.ycm_extra_conf.py b/.ycm_extra_conf.py
index c800b99..eb302d6 100644
--- a/.ycm_extra_conf.py
+++ b/.ycm_extra_conf.py
@@ -81,6 +81,8 @@ flags = [
'-isystem',
'/usr/include/c++/9.3.0',
'-isystem',
+'/usr/include/c++/10.2.0',
+'-isystem',
'/usr/include',
'-isystem',
'/usr/include/x86_64-linux-gnu',
diff --git a/install.sh b/install.sh
index f593669..02e91c9 100755
--- a/install.sh
+++ b/install.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# 获取linux发行版名称
function get_linux_distro()
@@ -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
@@ -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()
{
@@ -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()
{
@@ -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
@@ -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