Update install.sh

This commit is contained in:
Mr Chen 2025-01-10 23:15:01 +08:00
parent 0c7dc4dbee
commit 1bfc02a892
1 changed files with 10 additions and 10 deletions

View File

@ -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
# ----------------------------------------------------------------------- #