Update install.sh
This commit is contained in:
parent
0c7dc4dbee
commit
1bfc02a892
|
|
@ -31,17 +31,17 @@ if [ ! -d $sourcePath/php/php${PHP_VER} ];then
|
|||
|
||||
# ----------------------------------------------------------------------- #
|
||||
# 中国优化安装
|
||||
# cn=$(curl -fsSL -m 10 -s http://ipinfo.io/json | grep "\"country\": \"CN\"")
|
||||
# LOCAL_ADDR=common
|
||||
# if [ ! -z "$cn" ];then
|
||||
# LOCAL_ADDR=cn
|
||||
# fi
|
||||
cn=$(curl -fsSL -m 10 -s http://ipinfo.io/json | grep "\"country\": \"CN\"")
|
||||
LOCAL_ADDR=common
|
||||
if [ ! -z "$cn" ];then
|
||||
LOCAL_ADDR=cn
|
||||
fi
|
||||
|
||||
# if [ "$LOCAL_ADDR" == "cn" ];then
|
||||
# if [ ! -f $sourcePath/php/php-${version}.tar.xz ];then
|
||||
# wget --no-check-certificate -O $sourcePath/php/php-${version}.tar.xz https://mirrors.sohu.com/php/php-${version}.tar.xz
|
||||
# fi
|
||||
# fi
|
||||
if [ "$LOCAL_ADDR" == "cn" ];then
|
||||
if [ ! -f $sourcePath/php/php-${version}.tar.xz ];then
|
||||
wget --no-check-certificate -O $sourcePath/php/php-${version}.tar.xz https://mirrors.nju.edu.cn/php/php-${version}.tar.xz
|
||||
fi
|
||||
fi
|
||||
# ----------------------------------------------------------------------- #
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue