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 }