File tree 1 file changed +11
-12
lines changed
1 file changed +11
-12
lines changed Original file line number Diff line number Diff line change @@ -322,18 +322,17 @@ mw_update_venv()
322
322
323
323
mw_mirror ()
324
324
{
325
- # LOCAL_ADDR=common
326
- # cn=$(curl -fsSL -m 10 -s http://ipinfo.io/json | grep "\"country\": \"CN\"")
327
- # if [ ! -z "$cn" ] || [ "$?" == "0" ] ;then
328
- # LOCAL_ADDR=cn
329
- # fi
330
-
331
- # if [ "$LOCAL_ADDR" == "common" ];then
332
- # bash <(curl --insecure -sSL https://raw.githubusercontent.com/midoks/change-linux-mirrors/main/change-mirrors.sh)
333
- # else
334
- # bash <(curl -sSL https://linuxmirrors.cn/main.sh)
335
- # fi
336
- bash <( curl -sSL https://linuxmirrors.cn/main.sh)
325
+ LOCAL_ADDR=common
326
+ cn=$( curl -fsSL -m 10 -s http://ipinfo.io/json | grep " \" country\" : \" CN\" " )
327
+ if [ ! -z " $cn " ] || [ " $? " == " 0" ] ; then
328
+ LOCAL_ADDR=cn
329
+ fi
330
+
331
+ if [ " $LOCAL_ADDR " == " common" ]; then
332
+ bash <( curl --insecure -sSL https://raw.githubusercontent.com/midoks/change-linux-mirrors/main/change-mirrors.sh)
333
+ else
334
+ bash <( curl -sSL https://linuxmirrors.cn/main.sh)
335
+ fi
337
336
cd ${ROOT_PATH}
338
337
}
339
338
You can’t perform that action at this time.
0 commit comments