From 5b8c71265bf6fef95e09efe0436bf9719c1945ab Mon Sep 17 00:00:00 2001 From: Konano Date: Sun, 26 Apr 2026 17:13:33 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=9B=B4=E6=96=B0=20Ubuntu=20=E6=BA=90?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=EF=BC=8C=E4=BD=BF=E7=94=A8=E5=8A=A8=E6=80=81?= =?UTF-8?q?=E7=89=88=E6=9C=AC=E4=BB=A3=E6=9B=BF=E5=9B=BA=E5=AE=9A=E7=89=88?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Copilot --- configure_priv.sh | 2 +- files/sources.list/ubuntu.sources | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/configure_priv.sh b/configure_priv.sh index 342547d..7f68efd 100755 --- a/configure_priv.sh +++ b/configure_priv.sh @@ -28,7 +28,7 @@ configure_tuna() { if [ -f /etc/apt/sources.list.d/ubuntu.sources ] && grep -q tuna /etc/apt/sources.list.d/ubuntu.sources; then echo "检测到已切换到 Tuna 源,跳过覆盖。" else - sudo cp $scriptdir/files/sources.list/ubuntu.sources /etc/apt/sources.list.d/ubuntu.sources + sed "s|__CODENAME__|$(lsb_release -cs)|g" "$scriptdir/files/sources.list/ubuntu.sources" | sudo tee /etc/apt/sources.list.d/ubuntu.sources >/dev/null fi fi } diff --git a/files/sources.list/ubuntu.sources b/files/sources.list/ubuntu.sources index 66990fc..f11b4ef 100644 --- a/files/sources.list/ubuntu.sources +++ b/files/sources.list/ubuntu.sources @@ -1,11 +1,11 @@ Types: deb URIs: https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ -Suites: noble noble-updates noble-backports +Suites: __CODENAME__ __CODENAME__-updates __CODENAME__-backports Components: main restricted universe multiverse Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg Types: deb URIs: https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ -Suites: noble-security +Suites: __CODENAME__-security Components: main restricted universe multiverse Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg