mirror of
https://gitee.com/SuperManito/LinuxMirrors
synced 2025-11-17 14:50:27 +08:00
优化
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
## Author: SuperManito
|
## Author: SuperManito
|
||||||
## Modified: 2025-09-04
|
## Modified: 2025-09-06
|
||||||
## License: MIT
|
## License: MIT
|
||||||
## GitHub: https://github.com/SuperManito/LinuxMirrors
|
## GitHub: https://github.com/SuperManito/LinuxMirrors
|
||||||
## Website: https://linuxmirrors.cn
|
## Website: https://linuxmirrors.cn
|
||||||
@@ -1505,9 +1505,19 @@ function remove_original_mirrors() {
|
|||||||
USE_DEB822_FORMAT="true"
|
USE_DEB822_FORMAT="true"
|
||||||
fi
|
fi
|
||||||
# /etc/apt/sources.list
|
# /etc/apt/sources.list
|
||||||
if [[ "${USE_DEB822_FORMAT}" != "true" && "${SYSTEM_JUDGMENT}" != "${SYSTEM_LINUX_MINT}" ]]; then
|
if [[ "${USE_DEB822_FORMAT}" != "true" ]] && [[ "${SYSTEM_JUDGMENT}" != "${SYSTEM_LINUX_MINT}" ]]; then
|
||||||
[ -s "${File_AptSourceList}" ] && clear_file $File_AptSourceList
|
[ -s "${File_AptSourceList}" ] && clear_file $File_AptSourceList
|
||||||
fi
|
fi
|
||||||
|
## 解决软件源冲突
|
||||||
|
if [[ "${USE_DEB822_FORMAT}" == "true" ]] && [ -s "${File_AptSourceList}" ]; then
|
||||||
|
if [[ "${SOURCE_BRANCH}" ]]; then
|
||||||
|
sed -e "/^deb\(-src\)\? http.*\/${SOURCE_BRANCH}/d" \
|
||||||
|
-e "/^#[[:space:]]*deb\(-src\)\? http.*\/${SOURCE_BRANCH}/d" \
|
||||||
|
-e "/^#.*\(默认禁用源码镜像以提高更新速度\|安全更新软件源\|预发布软件源\).*/d" \
|
||||||
|
-i \
|
||||||
|
$File_AptSourceList
|
||||||
|
fi
|
||||||
|
fi
|
||||||
# Armbian
|
# Armbian
|
||||||
[ -f "${File_ArmbianRelease}" ] && clear_file $File_ArmbianSourceList
|
[ -f "${File_ArmbianRelease}" ] && clear_file $File_ArmbianSourceList
|
||||||
# Proxmox VE
|
# Proxmox VE
|
||||||
|
|||||||
Reference in New Issue
Block a user