Skip to content

Commit

Permalink
Merge pull request chxuan#321 from Ro0tk1t/master
Browse files Browse the repository at this point in the history
parrotsec os support
  • Loading branch information
chxuan authored Dec 12, 2020
2 parents 8b5a0f4 + b464959 commit 0a229e3
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 3 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ An automatic configuration program for vim
<td><a href="https://distrowatch.com/table.php?distribution=manjaro"><img src="https://distrowatch.com/images/yvzhuwbpy/manjaro.png"/></a><p align="center"></p></td>
<td><a href="https://distrowatch.com/table.php?distribution=opensuse"><img src="https://distrowatch.com/images/yvzhuwbpy/opensuse.png"/></a><p align="center"></p></td>
<td><a href="https://distrowatch.com/table.php?distribution=gentoo"><img src="https://distrowatch.com/images/yvzhuwbpy/gentoo.png"/></a><p align="center"></p></td>
<td><a href="https://distrowatch.com/table.php?distribution=parrot"><img src="https://distrowatch.com/images/yvzhuwbpy/parrot.png"/></a><p align="center"></p></td>
<td><a href="https://distrowatch.com/table.php?distribution=raspios"><img src="https://distrowatch.com/images/yvzhuwbpy/raspios.png"/></a><p align="center"></p></td>
<td><a href="https://distrowatch.com/table.php?distribution=freebsd"><img src="https://distrowatch.com/images/yvzhuwbpy/freebsd.png"/></a><p align="center"></p></td>
</tr>
Expand Down
45 changes: 42 additions & 3 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ function get_linux_distro()
echo "Debian"
elif grep -Eq "Kali" /etc/*-release; then
echo "Kali"
elif grep -Eq "Parrot" /etc/*-release; then
echo "Parrot"
elif grep -Eq "CentOS" /etc/*-release; then
echo "CentOS"
elif grep -Eq "fedora" /etc/*-release; then
Expand Down Expand Up @@ -176,7 +178,6 @@ function compile_vim_on_ubuntu()
--enable-multibyte \
--enable-rubyinterp \
--enable-pythoninterp \
--with-python-config-dir=/usr/lib/python2.7/config-`dpkg-architecture -qDEB_HOST_MULTIARCH` \
--enable-perlinterp \
--enable-luainterp \
--enable-gui=gtk2 \
Expand All @@ -199,7 +200,28 @@ function compile_vim_on_debian()
--enable-multibyte \
--enable-rubyinterp \
--enable-pythoninterp \
--with-python-config-dir=/usr/lib/python2.7/config-`dpkg-architecture -qDEB_HOST_MULTIARCH` \
--enable-perlinterp \
--enable-luainterp \
--enable-gui=gtk2 \
--enable-cscope \
--prefix=/usr
make
sudo make install
cd -
}

# 在parrot上源代码安装vim
function compile_vim_on_parrot()
{
sudo apt-get install -y libncurses5-dev libncurses5 libgtk2.0-dev libatk1.0-dev libcairo2-dev libx11-dev libxpm-dev libxt-dev python-dev python3-dev ruby-dev lua5.1 vim

rm -rf ~/vim82
git clone https://gitee.com/chxuan/vim82.git ~/vim82
cd ~/vim82
./configure --with-features=huge \
--enable-multibyte \
--enable-rubyinterp \
--enable-pythoninterp \
--enable-perlinterp \
--enable-luainterp \
--enable-gui=gtk2 \
Expand Down Expand Up @@ -228,7 +250,6 @@ function compile_vim_on_centos()
--with-tlib=tinfo \
--enable-rubyinterp=yes \
--enable-pythoninterp=yes \
--with-python-config-dir=/lib64/python2.7/config \
--enable-perlinterp=yes \
--enable-luainterp=yes \
--enable-gui=gtk2 \
Expand Down Expand Up @@ -302,6 +323,14 @@ function install_prepare_software_on_debian()
compile_vim_on_debian
}

# 安装parrot必备软件
function install_prepare_software_on_parrot()
{
sudo apt-get update
sudo apt-get install -y cmake exuberant-ctags build-essential python python-dev python3-dev fontconfig libfile-next-perl ack git
compile_vim_on_parrot
}

# 安装centos必备软件
function install_prepare_software_on_centos()
{
Expand Down Expand Up @@ -557,6 +586,14 @@ function install_vimplus_on_debian()
begin_install_vimplus
}

# 在parrot上安装vimplus
function install_vimplus_on_parrot()
{
backup_vimrc_and_vim
install_prepare_software_on_parrot
begin_install_vimplus
}

# 在centos上安装vimplus
function install_vimplus_on_centos()
{
Expand Down Expand Up @@ -619,6 +656,8 @@ function install_vimplus_on_linux()
install_vimplus_on_debian
elif [ ${distro} == "Kali" ]; then
install_vimplus_on_debian
elif [ ${distro} == "Parrot" ]; then
install_vimplus_on_parrot
elif [ ${distro} == "CentOS" ]; then
install_vimplus_on_centos
elif [ ${distro} == "fedora" ]; then
Expand Down

0 comments on commit 0a229e3

Please sign in to comment.