Update intl.sh

pull/420/head
midoks 2 years ago
parent 5e68c7bf0a
commit a1d26dcd45
  1. 59
      plugins/php/versions/common/intl.sh

@ -12,31 +12,31 @@ serverPath=$(dirname "$rootPath")
sourcePath=${serverPath}/source/php sourcePath=${serverPath}/source/php
_os=`uname` # _os=`uname`
if [ ${_os} == "Darwin" ]; then # if [ ${_os} == "Darwin" ]; then
OSNAME='macos' # OSNAME='macos'
elif grep -Eq "openSUSE" /etc/*-release; then # elif grep -Eq "openSUSE" /etc/*-release; then
OSNAME='opensuse' # OSNAME='opensuse'
elif grep -Eq "FreeBSD" /etc/*-release; then # elif grep -Eq "FreeBSD" /etc/*-release; then
OSNAME='freebsd' # OSNAME='freebsd'
elif grep -Eqi "CentOS" /etc/issue || grep -Eqi "CentOS" /etc/*-release; then # elif grep -Eqi "CentOS" /etc/issue || grep -Eqi "CentOS" /etc/*-release; then
OSNAME='rhel' # OSNAME='rhel'
elif grep -Eqi "Fedora" /etc/issue || grep -Eqi "Fedora" /etc/*-release; then # elif grep -Eqi "Fedora" /etc/issue || grep -Eqi "Fedora" /etc/*-release; then
OSNAME='rhel' # OSNAME='rhel'
elif grep -Eqi "Rocky" /etc/issue || grep -Eqi "Rocky" /etc/*-release; then # elif grep -Eqi "Rocky" /etc/issue || grep -Eqi "Rocky" /etc/*-release; then
OSNAME='rhel' # OSNAME='rhel'
elif grep -Eqi "AlmaLinux" /etc/issue || grep -Eqi "AlmaLinux" /etc/*-release; then # elif grep -Eqi "AlmaLinux" /etc/issue || grep -Eqi "AlmaLinux" /etc/*-release; then
OSNAME='rhel' # OSNAME='rhel'
elif grep -Eqi "Amazon Linux" /etc/issue || grep -Eqi "Amazon Linux" /etc/*-release; then # elif grep -Eqi "Amazon Linux" /etc/issue || grep -Eqi "Amazon Linux" /etc/*-release; then
OSNAME='amazon' # OSNAME='amazon'
elif grep -Eqi "Debian" /etc/issue || grep -Eqi "Debian" /etc/*-release; then # elif grep -Eqi "Debian" /etc/issue || grep -Eqi "Debian" /etc/*-release; then
OSNAME='debian' # OSNAME='debian'
elif grep -Eqi "Ubuntu" /etc/issue || grep -Eqi "Ubuntu" /etc/*-release; then # elif grep -Eqi "Ubuntu" /etc/issue || grep -Eqi "Ubuntu" /etc/*-release; then
OSNAME='ubuntu' # OSNAME='ubuntu'
else # else
OSNAME='unknow' # OSNAME='unknow'
fi # fi
actionType=$1 actionType=$1
version=$2 version=$2
@ -63,12 +63,9 @@ fi
OPTIONS='' OPTIONS=''
if [ "$version" -lt "74" ];then if [ "$version" -lt "74" ];then
if [ $OSNAME == 'debian' ] || [ $OSNAME == 'ubuntu' ] ;then # cd /www/server/mdserver-web/plugins/php/lib && /bin/bash icu.sh
echo "debian/ubuntu use system!" cd ${rootPath}/plugins/php/lib && /bin/bash icu.sh
else OPTIONS="--with-icu-dir=${serverPath}/lib/icu"
cd ${rootPath}/plugins/php/lib && /bin/bash icu.sh
OPTIONS="--with-icu-dir=${serverPath}/lib/icu"
fi
fi fi

Loading…
Cancel
Save