From d4d383f99b0d420bb6a02e4c587f43173b016e0d Mon Sep 17 00:00:00 2001 From: bin456789 Date: Wed, 25 Oct 2023 23:06:26 +0800 Subject: [PATCH] =?UTF-8?q?core:=20=E8=AE=BE=E7=BD=AE=20alpine=20community?= =?UTF-8?q?=20=E5=9B=BD=E5=86=85=E6=BA=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- reinstall.sh | 3 ++- trans.sh | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) 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 }