From 4afbd5a2feaef98b9a99ee4027c37cd640c11ab3 Mon Sep 17 00:00:00 2001 From: akarin233 Date: Wed, 5 Feb 2025 15:42:04 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=BF=E7=94=A8=20--ci=20=E5=AE=89=E8=A3=85?= =?UTF-8?q?=20Debian=20=E6=97=B6=20CN=20=E7=8E=AF=E5=A2=83=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=E5=9B=BD=E5=86=85=E6=BA=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- trans.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/trans.sh b/trans.sh index 2bc31b7..bd3e0a2 100644 --- a/trans.sh +++ b/trans.sh @@ -2767,8 +2767,14 @@ EOF # 获取当前开启的 Components, 后面要用 if [ -f $os_dir/etc/apt/sources.list.d/debian.sources ]; then comps=$(grep ^Components: $os_dir/etc/apt/sources.list.d/debian.sources | head -1 | cut -d' ' -f2-) + if is_in_china; then + sed -i 's|[a-zA-Z.-]*\.debian\.org|mirror.nju.edu.cn|g' $os_dir/etc/apt/mirrors/debian.list $os_dir/etc/apt/mirrors/debian-security.list + fi else comps=$(grep '^deb ' $os_dir/etc/apt/sources.list | head -1 | cut -d' ' -f4-) + if is_in_china; then + sed -i 's|[a-zA-Z.-]*\.debian\.org|mirror.nju.edu.cn|g' $os_dir/etc/apt/sources.list + fi fi # EOL 处理