Update lib.sh

pull/109/head
midoks 3 years ago
parent ea2d8c330a
commit 389f4b8052
  1. 40
      scripts/lib.sh

@ -223,6 +223,37 @@ echo -e "Install_Curl" >> ${libPath}/lib.pl
}
_os=`uname`
if grep -Eqi "Ubuntu" /etc/issue || grep -Eq "Ubuntu" /etc/*-release; then
sudo ln -sf /bin/bash /bin/sh
#sudo dpkg-reconfigure dash
fi
if [ ${_os} == "Darwin" ]; then
OSNAME='macos'
elif grep -Eqi "CentOS" /etc/issue || grep -Eq "CentOS" /etc/*-release; then
OSNAME='centos'
elif grep -Eqi "Red Hat Enterprise Linux Server" /etc/issue || grep -Eq "Red Hat Enterprise Linux Server" /etc/*-release; then
OSNAME='rhel'
elif grep -Eqi "Aliyun" /etc/issue || grep -Eq "Aliyun" /etc/*-release; then
OSNAME='aliyun'
elif grep -Eqi "Fedora" /etc/issue || grep -Eq "Fedora" /etc/*-release; then
OSNAME='fedora'
elif grep -Eqi "Amazon Linux AMI" /etc/issue || grep -Eq "Amazon Linux AMI" /etc/*-release; then
OSNAME='amazon'
elif grep -Eqi "Debian" /etc/issue || grep -Eq "Debian" /etc/*-release; then
OSNAME='debian'
elif grep -Eqi "Ubuntu" /etc/issue || grep -Eq "Ubuntu" /etc/*-release; then
OSNAME='ubuntu'
elif grep -Eqi "Raspbian" /etc/issue || grep -Eq "Raspbian" /etc/*-release; then
OSNAME='raspbian'
elif grep -Eqi "Deepin" /etc/issue || grep -Eq "Deepin" /etc/*-release; then
OSNAME='deepin'
else
OSNAME='unknow'
fi
Install_Libiconv
# Install_Libmemcached
@ -232,14 +263,19 @@ Install_Libiconv
# Install_OpenSSL
Install_Libzip
sysName=`uname`
if [ "$sysName" == "Darwin" ];then
OSNAME=`uname`
if [ "$OSNAME" == "macos" ]; then
brew install libmemcached
brew install curl
brew install zlib
brew install freetype
brew install openssl
brew install libzip
elif [ "$OSNAME" == "ubuntu" ]; then
apt install -y graphviz
else
yum -y install libmemcached libmemcached-devel
yum -y install curl curl-devel

Loading…
Cancel
Save