统一修改国家和地区的判断方式
This commit is contained in:
@@ -24,13 +24,11 @@ TARGET=/tmp/cAdvisor
|
||||
is_cn=false
|
||||
|
||||
echo "Detecting geographic location..."
|
||||
COUNTRY=$(curl -s --max-time 5 https://ipinfo.littlediary.cn/info | grep -o '"countryName":"[^"]*"' | cut -d'"' -f4)
|
||||
|
||||
COUNTRY=$(curl -s --max-time 3 https://ipinfo.io/country || true)
|
||||
if [ "$COUNTRY" = "CN" ]; then
|
||||
if [ "$COUNTRY" = "China" ]; then
|
||||
is_cn=true
|
||||
fi
|
||||
|
||||
|
||||
if [ "$is_cn" = true ]; then
|
||||
echo "Geolocation: China mainland detected"
|
||||
DOWNLOAD_URL="$CN_URL"
|
||||
|
||||
Reference in New Issue
Block a user