mirror of
https://github.com/bin456789/reinstall.git
synced 2025-12-10 15:37:43 +08:00
common: 改善逻辑和错误
This commit is contained in:
6
trans.sh
6
trans.sh
@ -26,8 +26,10 @@ error() {
|
||||
}
|
||||
|
||||
add_community_repo() {
|
||||
alpine_ver=$(cut -d. -f1,2 </etc/alpine-release)
|
||||
echo http://dl-cdn.alpinelinux.org/alpine/v$alpine_ver/community >>/etc/apk/repositories
|
||||
if ! grep -x 'http.*/community' /etc/apk/repositories; then
|
||||
alpine_ver=$(cut -d. -f1,2 </etc/alpine-release)
|
||||
echo http://dl-cdn.alpinelinux.org/alpine/v$alpine_ver/community >>/etc/apk/repositories
|
||||
fi
|
||||
}
|
||||
|
||||
cp() {
|
||||
|
||||
Reference in New Issue
Block a user