feat: 更新 Ubuntu 源配置,使用动态版本代替固定版本

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
Konano 2026-04-26 17:13:33 +08:00
parent 1586628297
commit 5b8c71265b
Signed by: Nano
GPG Key ID: 93686B78EE43A65A
2 changed files with 3 additions and 3 deletions

View File

@ -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 if [ -f /etc/apt/sources.list.d/ubuntu.sources ] && grep -q tuna /etc/apt/sources.list.d/ubuntu.sources; then
echo "检测到已切换到 Tuna 源,跳过覆盖。" echo "检测到已切换到 Tuna 源,跳过覆盖。"
else 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
fi fi
} }

View File

@ -1,11 +1,11 @@
Types: deb Types: deb
URIs: https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ 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 Components: main restricted universe multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
Types: deb Types: deb
URIs: https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ URIs: https://mirrors.tuna.tsinghua.edu.cn/ubuntu/
Suites: noble-security Suites: __CODENAME__-security
Components: main restricted universe multiverse Components: main restricted universe multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg