diff --git a/reinstall.sh b/reinstall.sh index 995f0ca..3ad9f2a 100644 --- a/reinstall.sh +++ b/reinstall.sh @@ -212,7 +212,8 @@ add_community_repo_for_alpine() { fi if ! grep -x "http.*/$alpine_ver/community" /etc/apk/repositories; then - echo http://dl-cdn.alpinelinux.org/alpine/$alpine_ver/community >>/etc/apk/repositories + is_in_china && mirror=mirrors.tuna.tsinghua.edu.cn || mirror=dl-cdn.alpinelinux.org + echo https://$mirror/alpine/$alpine_ver/community >>/etc/apk/repositories fi } diff --git a/trans.sh b/trans.sh index 0c707a5..9809495 100644 --- a/trans.sh +++ b/trans.sh @@ -48,7 +48,8 @@ add_community_repo() { fi if ! grep -x "http.*/$alpine_ver/community" /etc/apk/repositories; then - echo http://dl-cdn.alpinelinux.org/alpine/$alpine_ver/community >>/etc/apk/repositories + is_in_china && mirror=mirrors.tuna.tsinghua.edu.cn || mirror=dl-cdn.alpinelinux.org + echo https://$mirror/alpine/$alpine_ver/community >>/etc/apk/repositories fi }