Update install.sh

This commit is contained in:
midoks
2023-09-17 23:22:56 +08:00
parent 0e5f762919
commit 3819e2f470
+2 -8
View File
@@ -14,16 +14,10 @@ install_tmp=${rootPath}/tmp/mw_install.pl
VERSION=$2
sys_os=`uname`
# cn=$(curl -fsSL -m 10 http://ipinfo.io/json | grep "\"country\": \"CN\"")
# HTTP_PREFIX="https://"
# if [ ! -z "$cn" ];then
# HTTP_PREFIX="https://ghproxy.com/"
# fi
HTTP_PREFIX="https://"
LOCAL_ADDR=common
ping -c 1 gihub.com > /dev/null 2>&1
if [ "$?" != "0" ];then
cn=$(curl -fsSL -m 10 -s http://ipinfo.io/json | grep "\"country\": \"CN\"")
if [ ! -z "$cn" ] || [ "$?" == "0" ] ;then
LOCAL_ADDR=cn
HTTP_PREFIX="https://ghproxy.com/"
fi