修改国家代号
This commit is contained in:
@@ -28,13 +28,11 @@ is_cn=false
|
||||
|
||||
echo "Detecting geographic location..."
|
||||
|
||||
COUNTRY=$(curl -s --max-time 5 https://ipinfo.littlediary.cn/info | grep -o '"country":"[^"]*"' | cut -d'"' -f4)
|
||||
COUNTRY=$(curl -s --max-time 5 https://ipinfo.littlediary.cn/info | grep -o '"countryName":"[^"]*"' | cut -d'"' -f4)
|
||||
|
||||
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