diff --git a/scripts/update.sh b/scripts/update.sh index 2d646237d..33c58ed19 100755 --- a/scripts/update.sh +++ b/scripts/update.sh @@ -60,9 +60,9 @@ fi HTTP_PREFIX="https://" LOCAL_ADDR=common cn=$(curl -fsSL -m 10 -s http://ipinfo.io/json | grep "\"country\": \"CN\"") -if [ ! -z "$cn" ] || [ "$?" != "0" ] ;then +if [ ! -z "$cn" ] || [ "$?" == "0" ] ;then LOCAL_ADDR=cn - HTTP_PREFIX="https://ghproxy.com/" + HTTP_PREFIX="https://ghproxy.com/" fi echo "local:${LOCAL_ADDR}" diff --git a/scripts/update_dev.sh b/scripts/update_dev.sh index be166efb2..b241a5598 100755 --- a/scripts/update_dev.sh +++ b/scripts/update_dev.sh @@ -66,9 +66,9 @@ fi HTTP_PREFIX="https://" LOCAL_ADDR=common cn=$(curl -fsSL -m 10 -s http://ipinfo.io/json | grep "\"country\": \"CN\"") -if [ ! -z "$cn" ] || [ "$?" != "0" ] ;then +if [ ! -z "$cn" ] || [ "$?" == "0" ] ;then LOCAL_ADDR=cn - HTTP_PREFIX="https://ghproxy.com/" + HTTP_PREFIX="https://ghproxy.com/" fi echo "local:${LOCAL_ADDR}"