diff --git a/plugins/php/lib/icu.sh b/plugins/php/lib/icu.sh index f988c4c88..568bf155d 100644 --- a/plugins/php/lib/icu.sh +++ b/plugins/php/lib/icu.sh @@ -15,7 +15,7 @@ SOURCE_ROOT=$rootPath/source/lib HTTP_PREFIX="https://" cn=$(curl -fsSL -m 10 http://ipinfo.io/json | grep "\"country\": \"CN\"") -if [ ! -z "$cn" ] || [ "$?" != "0" ] ;then +if [ ! -z "$cn" ] || [ "$?" == "0" ] ;then HTTP_PREFIX="https://ghproxy.com/" fi diff --git a/plugins/php/lib/libiconv.sh b/plugins/php/lib/libiconv.sh index ce08d77f7..aa5c8d095 100644 --- a/plugins/php/lib/libiconv.sh +++ b/plugins/php/lib/libiconv.sh @@ -15,7 +15,7 @@ SOURCE_ROOT=$rootPath/source/lib HTTP_PREFIX="https://" cn=$(curl -fsSL -m 10 http://ipinfo.io/json | grep "\"country\": \"CN\"") -if [ ! -z "$cn" ] || [ "$?" != "0" ] ;then +if [ ! -z "$cn" ] || [ "$?" == "0" ] ;then HTTP_PREFIX="https://ghproxy.com/" fi diff --git a/plugins/php/lib/libzip.sh b/plugins/php/lib/libzip.sh index fca760d12..12933ec78 100644 --- a/plugins/php/lib/libzip.sh +++ b/plugins/php/lib/libzip.sh @@ -16,7 +16,7 @@ SOURCE_ROOT=$rootPath/source/lib HTTP_PREFIX="https://" cn=$(curl -fsSL -m 10 http://ipinfo.io/json | grep "\"country\": \"CN\"") -if [ ! -z "$cn" ] || [ "$?" != "0" ] ;then +if [ ! -z "$cn" ] || [ "$?" == "0" ] ;then HTTP_PREFIX="https://ghproxy.com/" fi diff --git a/plugins/php/lib/oniguruma.sh b/plugins/php/lib/oniguruma.sh index 100d2d109..2d6d0381b 100644 --- a/plugins/php/lib/oniguruma.sh +++ b/plugins/php/lib/oniguruma.sh @@ -15,7 +15,7 @@ SOURCE_ROOT=$rootPath/source/lib HTTP_PREFIX="https://" cn=$(curl -fsSL -m 10 http://ipinfo.io/json | grep "\"country\": \"CN\"") -if [ ! -z "$cn" ] || [ "$?" != "0" ] ;then +if [ ! -z "$cn" ] || [ "$?" == "0" ] ;then HTTP_PREFIX="https://ghproxy.com/" fi diff --git a/plugins/php/lib/openssl_10.sh b/plugins/php/lib/openssl_10.sh index 49918c0f6..6fb625d19 100644 --- a/plugins/php/lib/openssl_10.sh +++ b/plugins/php/lib/openssl_10.sh @@ -15,7 +15,7 @@ SOURCE_ROOT=$rootPath/source/lib HTTP_PREFIX="https://" cn=$(curl -fsSL -m 10 http://ipinfo.io/json | grep "\"country\": \"CN\"") -if [ ! -z "$cn" ] || [ "$?" != "0" ] ;then +if [ ! -z "$cn" ] || [ "$?" == "0" ] ;then HTTP_PREFIX="https://ghproxy.com/" fi diff --git a/plugins/php/lib/zlib.sh b/plugins/php/lib/zlib.sh index e3b45c1cd..3173582d0 100644 --- a/plugins/php/lib/zlib.sh +++ b/plugins/php/lib/zlib.sh @@ -15,7 +15,7 @@ SOURCE_ROOT=$rootPath/source/lib HTTP_PREFIX="https://" cn=$(curl -fsSL -m 10 http://ipinfo.io/json | grep "\"country\": \"CN\"") -if [ ! -z "$cn" ] || [ "$?" != "0" ] ;then +if [ ! -z "$cn" ] || [ "$?" == "0" ] ;then HTTP_PREFIX="https://ghproxy.com/" fi diff --git a/scripts/lib.sh b/scripts/lib.sh index 4224a01a4..f37ee5da4 100755 --- a/scripts/lib.sh +++ b/scripts/lib.sh @@ -67,7 +67,7 @@ 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/" fi