@@ -9,7 +9,9 @@ function get_platform_type()
99# 获取linux平台类型,ubuntu还是centos
1010function get_linux_platform_type()
1111{
12- if which apt-get > /dev/null ; then
12+ if which zypper > /dev/null ; then
13+ echo " opensuse"
14+ elif which apt-get > /dev/null ; then
1315 echo " ubuntu" # debian ubuntu系列
1416 elif which yum > /dev/null ; then
1517 echo " centos" # centos redhat系列
@@ -150,6 +152,12 @@ function install_prepare_software_on_archlinux()
150152 sudo pacman -S --noconfirm vim ctags automake gcc cmake python3 python2 curl ack
151153}
152154
155+ # 安装opensuse发行版必要软件
156+ function install_prepare_software_on_opensuse()
157+ {
158+ sudo zypper -y vim ctags gcc cmake python curl ack fontconfig
159+ }
160+
153161# 拷贝文件
154162function copy_files()
155163{
@@ -299,6 +307,13 @@ function install_vimplus_on_archlinux()
299307 begin_install_vimplus
300308}
301309
310+ # 在opensuse发行版安装vimplus
311+ function install_vimplus_on_opensuse()
312+ {
313+ install_prepare_software_on_opensuse
314+ begin_install_vimplus
315+ }
316+
302317# 在linux平台安装vimplus
303318function install_vimplus_on_linux()
304319{
@@ -311,6 +326,8 @@ function install_vimplus_on_linux()
311326 install_vimplus_on_centos
312327 elif [ ${type} == " archlinux" ]; then
313328 install_vimplus_on_archlinux
329+ elif [ ${type} == " opensuse" ]; then
330+ install_vimplus_on_opensuse
314331 else
315332 echo " Not support this linux platform type: " ${type}
316333 fi
0 commit comments