mdserver-web/plugins/php/lib/icu.sh

29 lines
782 B
Bash
Raw Normal View History

2022-06-11 09:19:59 -04:00
#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
curPath=`pwd`
rootPath=$(dirname "$curPath")
rootPath=$(dirname "$rootPath")
rootPath=$(dirname "$rootPath")
rootPath=$(dirname "$rootPath")
2022-06-11 09:40:01 -04:00
# echo $rootPath
2022-06-11 09:19:59 -04:00
2022-06-11 09:40:01 -04:00
SERVER_ROOT=$rootPath/lib
SOURCE_ROOT=$rootPath/source/lib
2022-06-11 09:19:59 -04:00
2022-06-11 09:40:01 -04:00
if [ ! -d ${SERVER_ROOT}/icu ];then
2022-06-11 09:19:59 -04:00
2022-06-11 09:40:01 -04:00
if [ ! -f ${SOURCE_ROOT}/icu4c-52_2-src.tgz ];then
wget -O ${SOURCE_ROOT}/icu4c-52_2-src.tgz https://github.com/unicode-org/icu/releases/download/release-52-2/icu4c-52_2-src.tgz
2022-06-11 09:19:59 -04:00
fi
if [ ! -d ${SERVER_ROOT}/icu/52.2 ];then
2022-06-11 09:40:01 -04:00
cd ${SOURCE_ROOT} && tar -zxvf icu4c-52_2-src.tgz
2022-06-11 09:19:59 -04:00
2022-06-11 09:40:01 -04:00
cd ${SOURCE_ROOT}/icu/source
./runConfigureICU Linux --prefix=${SERVER_ROOT}/icu && make CXXFLAGS="-g -O2 -std=c++11" && make install
2022-06-11 09:19:59 -04:00
fi
fi