pull/449/head
midoks 2 years ago
parent b703758d0e
commit ded33ed6b4
  1. 5
      scripts/update.sh
  2. 5
      scripts/update_dev.sh

@ -55,11 +55,10 @@ else
fi fi
# cn=$(curl -fsSL -m 10 http://ipinfo.io/json | grep "\"country\": \"CN\"")
HTTP_PREFIX="https://" HTTP_PREFIX="https://"
LOCAL_ADDR=common LOCAL_ADDR=common
ping -c 1 github.com > /dev/null 2>&1 cn=$(curl -fsSL -m 10 -s http://ipinfo.io/json | grep "\"country\": \"CN\"")
if [ "$?" != "0" ];then if [ ! -z "$cn" ] || [ "$?" != "0" ] ;then
LOCAL_ADDR=cn LOCAL_ADDR=cn
HTTP_PREFIX="https://ghproxy.com/" HTTP_PREFIX="https://ghproxy.com/"
fi fi

@ -61,11 +61,10 @@ fi
# LOCAL_ADDR=cn # LOCAL_ADDR=cn
# HTTP_PREFIX="https://ghproxy.com/" # HTTP_PREFIX="https://ghproxy.com/"
# fi # fi
cn=$(curl -fsSL -m 10 -s http://ipinfo.io/json | grep "\"country\": \"CN\"")
HTTP_PREFIX="https://" HTTP_PREFIX="https://"
LOCAL_ADDR=common LOCAL_ADDR=common
if [ ! -z "$cn" ];then cn=$(curl -fsSL -m 10 -s http://ipinfo.io/json | grep "\"country\": \"CN\"")
if [ ! -z "$cn" ] || [ "$?" != "0" ] ;then
LOCAL_ADDR=cn LOCAL_ADDR=cn
HTTP_PREFIX="https://ghproxy.com/" HTTP_PREFIX="https://ghproxy.com/"
fi fi

Loading…
Cancel
Save