Skip to content

Commit

Permalink
Merge pull request #697 from midoks/dev
Browse files Browse the repository at this point in the history
PHP国内安装优化
  • Loading branch information
midoks authored Jan 12, 2025
2 parents c10eac5 + 26bb200 commit 25fcf93
Show file tree
Hide file tree
Showing 14 changed files with 25 additions and 25 deletions.
2 changes: 1 addition & 1 deletion plugins/php/versions/52/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ if [ ! -d $sourcePath/php/php${PHP_VER} ];then

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
wget --no-check-certificate -O $sourcePath/php/php-${version}.tar.xz https://mirrors.nju.edu.cn/php/php-${version}.tar.xz
fi
fi
# ----------------------------------------------------------------------- #
Expand Down
2 changes: 1 addition & 1 deletion plugins/php/versions/53/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ if [ ! -d $sourcePath/php/php${PHP_VER} ];then

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
wget --no-check-certificate -O $sourcePath/php/php-${version}.tar.xz https://mirrors.nju.edu.cn/php/php-${version}.tar.xz
fi
fi
# ----------------------------------------------------------------------- #
Expand Down
2 changes: 1 addition & 1 deletion plugins/php/versions/54/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ if [ ! -d $sourcePath/php/php${PHP_VER} ];then

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
wget --no-check-certificate -O $sourcePath/php/php-${version}.tar.xz https://mirrors.nju.edu.cn/php/php-${version}.tar.xz
fi
fi
# ----------------------------------------------------------------------- #
Expand Down
2 changes: 1 addition & 1 deletion plugins/php/versions/55/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ if [ ! -d $sourcePath/php/php${PHP_VER} ];then

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
wget --no-check-certificate -O $sourcePath/php/php-${version}.tar.xz https://mirrors.nju.edu.cn/php/php-${version}.tar.xz
fi
fi
# ----------------------------------------------------------------------- #
Expand Down
2 changes: 1 addition & 1 deletion plugins/php/versions/56/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ if [ ! -d $sourcePath/php/php${PHP_VER} ];then

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
wget --no-check-certificate -O $sourcePath/php/php-${version}.tar.xz https://mirrors.nju.edu.cn/php/php-${version}.tar.xz
fi
fi
# ----------------------------------------------------------------------- #
Expand Down
2 changes: 1 addition & 1 deletion plugins/php/versions/70/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ if [ ! -d $sourcePath/php/php${PHP_VER} ];then

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
wget --no-check-certificate -O $sourcePath/php/php-${version}.tar.xz https://mirrors.nju.edu.cn/php/php-${version}.tar.xz
fi
fi
# ----------------------------------------------------------------------- #
Expand Down
2 changes: 1 addition & 1 deletion plugins/php/versions/71/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ if [ ! -d $sourcePath/php/php${PHP_VER} ];then

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
wget --no-check-certificate -O $sourcePath/php/php-${version}.tar.xz https://mirrors.nju.edu.cn/php/php-${version}.tar.xz
fi
fi
# ----------------------------------------------------------------------- #
Expand Down
2 changes: 1 addition & 1 deletion plugins/php/versions/72/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ if [ ! -d $sourcePath/php/php${PHP_VER} ];then

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
wget --no-check-certificate -O $sourcePath/php/php-${version}.tar.xz https://mirrors.nju.edu.cn/php/php-${version}.tar.xz
fi
fi
# ----------------------------------------------------------------------- #
Expand Down
2 changes: 1 addition & 1 deletion plugins/php/versions/74/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ if [ ! -d $sourcePath/php/php${PHP_VER} ];then

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
wget --no-check-certificate -O $sourcePath/php/php-${version}.tar.xz https://mirrors.nju.edu.cn/php/php-${version}.tar.xz
fi
fi
# ----------------------------------------------------------------------- #
Expand Down
2 changes: 1 addition & 1 deletion plugins/php/versions/80/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ if [ ! -d $sourcePath/php/php${PHP_VER} ];then

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
wget --no-check-certificate -O $sourcePath/php/php-${version}.tar.xz https://mirrors.nju.edu.cn/php/php-${version}.tar.xz
fi
fi
# ----------------------------------------------------------------------- #
Expand Down
2 changes: 1 addition & 1 deletion plugins/php/versions/81/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ if [ ! -d $sourcePath/php/php${PHP_VER} ];then

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
wget --no-check-certificate -O $sourcePath/php/php-${version}.tar.xz https://mirrors.nju.edu.cn/php/php-${version}.tar.xz
fi
fi
# ----------------------------------------------------------------------- #
Expand Down
2 changes: 1 addition & 1 deletion plugins/php/versions/82/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ if [ ! -d $sourcePath/php/php${PHP_VER} ];then

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
wget --no-check-certificate -O $sourcePath/php/php-${version}.tar.xz https://mirrors.nju.edu.cn/php/php-${version}.tar.xz
fi
fi
# ----------------------------------------------------------------------- #
Expand Down
22 changes: 11 additions & 11 deletions plugins/php/versions/83/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

# 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
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.nju.edu.cn/php/php-${version}.tar.xz
fi
fi
# ----------------------------------------------------------------------- #


Expand Down
4 changes: 2 additions & 2 deletions scripts/old/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ if [ $OSNAME != "macos" ];then
if [ "$LOCAL_ADDR" == "common" ];then
curl --insecure -sSLo /tmp/master.zip ${HTTP_PREFIX}github.com/midoks/mdserver-web/archive/refs/tags/${VERSION}.zip
cd /tmp && unzip /tmp/master.zip
mv -f /tmp/mdserver-web-master /www/server/mdserver-web
mv -f /tmp/mdserver-web-${VERSION} /www/server/mdserver-web
rm -rf /tmp/master.zip
rm -rf /tmp/mdserver-web-master
else
Expand Down Expand Up @@ -175,4 +175,4 @@ echo -e "Time consumed:\033[32m $outTime \033[0mMinute!"
} 1> >(tee $LOG_FILE) 2>&1

echo -e "\nInstall completed. If error occurs, please contact us with the log file mw-install.log ."
echo "安装完毕,如果出现错误,请带上同目录下的安装日志 mw-install.log 联系我们反馈."
echo "安装完毕,如果出现错误,请带上同目录下的安装日志 mw-install.log 联系我们反馈."

0 comments on commit 25fcf93

Please sign in to comment.