From c830907cefabce1956bfac51f7b7424862c99596 Mon Sep 17 00:00:00 2001 From: bin456789 Date: Fri, 25 Aug 2023 13:04:06 +0800 Subject: [PATCH] =?UTF-8?q?core:=20=E6=94=AF=E6=8C=81=E5=8E=9F=E7=B3=BB?= =?UTF-8?q?=E7=BB=9F=E4=B8=BA=20alpine=20edge?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- reinstall.sh | 12 +++++++++--- trans.sh | 12 +++++++++--- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/reinstall.sh b/reinstall.sh index dfe53ba..dee9ed0 100644 --- a/reinstall.sh +++ b/reinstall.sh @@ -156,9 +156,15 @@ test_url() { } add_community_repo_for_alpine() { - if ! grep -x 'http.*/community' /etc/apk/repositories; then - alpine_ver=$(cut -d. -f1,2 >/etc/apk/repositories + # 先检查原来的repo是不是egde + if grep -x 'http.*/edge/main' /etc/apk/repositories; then + alpine_ver=edge + else + alpine_ver=v$(cut -d. -f1,2 >/etc/apk/repositories fi } diff --git a/trans.sh b/trans.sh index 29957d6..0ecbdec 100644 --- a/trans.sh +++ b/trans.sh @@ -30,9 +30,15 @@ error_and_exit() { } add_community_repo() { - if ! grep -x 'http.*/community' /etc/apk/repositories; then - alpine_ver=$(cut -d. -f1,2 >/etc/apk/repositories + # 先检查原来的repo是不是egde + if grep -x 'http.*/edge/main' /etc/apk/repositories; then + alpine_ver=edge + else + alpine_ver=v$(cut -d. -f1,2 >/etc/apk/repositories fi }