From 98cc35768864472f7ecda12f04513c84ec093c1d Mon Sep 17 00:00:00 2001 From: SuperManito <68613938+SuperManito@users.noreply.github.com> Date: Tue, 9 May 2023 20:09:38 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitee/issue_template.md | 2 +- .github/ISSUE_TEMPLATE/bug_report.md | 2 +- .github/workflows/build-docs.yml | 2 +- ChangeMirrors.sh | 51 +++++++++----------- README.md | 34 +++++++------- docs/help/index.md | 8 ++-- docs/index.md | 35 +++++++------- docs/mirrors.md | 70 ++++++++++++++-------------- docs/stylesheets/extra.css | 28 +++++++++++ docs/use/command-options.md | 6 +-- docs/use/index.md | 16 +++++-- docs/use/not-enabled.md | 4 +- mkdocs.yml | 9 ++-- 13 files changed, 149 insertions(+), 118 deletions(-) diff --git a/.gitee/issue_template.md b/.gitee/issue_template.md index 84c88dc..8ca837f 100644 --- a/.gitee/issue_template.md +++ b/.gitee/issue_template.md @@ -47,7 +47,7 @@ ``` -## 5. 详细叙述您的问题 +## 5. 详细叙述你的问题 ### (1) 具体问题 A: diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 27036fe..672e25d 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -56,7 +56,7 @@ assignees: '' ``` -## 5. 详细叙述您的问题 +## 5. 详细叙述你的问题 ### (1) 具体问题 A: diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml index 67ae9eb..db69d11 100644 --- a/.github/workflows/build-docs.yml +++ b/.github/workflows/build-docs.yml @@ -20,7 +20,7 @@ jobs: path: .cache restore-keys: | mkdocs-material- - - run: pip install mkdocs-material mkdocs-glightbox + - run: pip install mkdocs-material mkdocs-glightbox mkdocs-exclude-search - run: cp -rvf ./ChangeMirrors.sh ./docs/main.sh - run: cp -rvf ./DockerInstallation.sh ./docs/docker.sh - run: mkdocs gh-deploy --force diff --git a/ChangeMirrors.sh b/ChangeMirrors.sh index a617e1a..0636a31 100644 --- a/ChangeMirrors.sh +++ b/ChangeMirrors.sh @@ -1,6 +1,6 @@ #!/bin/bash ## Author: SuperManito -## Modified: 2023-05-08 +## Modified: 2023-05-09 ## License: MIT ## Github: https://github.com/SuperManito/LinuxMirrors ## Website: https://linuxmirrors.cn @@ -152,8 +152,8 @@ SYSTEM_CENTOS="CentOS" SYSTEM_CENTOS_STREAM="CentOS Stream" SYSTEM_ROCKY="Rocky" SYSTEM_ALMALINUX="AlmaLinux" -SYSTEM_OPENCLOUDOS="OpenCloudOS" SYSTEM_FEDORA="Fedora" +SYSTEM_OPENCLOUDOS="OpenCloudOS" SYSTEM_OPENEULER="openEuler" SYSTEM_OPENSUSE="openSUSE" SYSTEM_ARCH="Arch" @@ -161,8 +161,8 @@ SYSTEM_ARCH="Arch" ## 定义目录和文件 File_LinuxRelease=/etc/os-release File_RedHatRelease=/etc/redhat-release -File_openEulerRelease=/etc/openEuler-release File_OpenCloudOSRelease=/etc/opencloudos-release +File_openEulerRelease=/etc/openEuler-release File_ArchRelease=/etc/arch-release File_DebianVersion=/etc/debian_version File_DebianSourceList=/etc/apt/sources.list @@ -269,7 +269,7 @@ function EnvJudgment() { if [ -s $File_DebianVersion ]; then SYSTEM_FACTIONS="${SYSTEM_DEBIAN}" elif [ -s $File_OpenCloudOSRelease ]; then - # OpenCloudOS 判断优先级需要高于 RedHat,因为8版本基于红帽而9版本不是,为了方便保证脚本逻辑性,所以将其判断放在前面并作为独立的派系 + # OpenCloudOS 判断优先级需要高于 RedHat,因为8版本基于红帽而9版本不是 SYSTEM_FACTIONS="${SYSTEM_OPENCLOUDOS}" elif [ -s $File_openEulerRelease ]; then SYSTEM_FACTIONS="${SYSTEM_OPENEULER}" @@ -316,7 +316,7 @@ function EnvJudgment() { SYSTEM_JUDGMENT="${SYSTEM_ARCH}" ;; esac - ## 判断系统是否在脚本支持范围内 + ## 判断系统和其版本是否受本脚本支持 case "${SYSTEM_JUDGMENT}" in "${SYSTEM_DEBIAN}") if [[ "${SYSTEM_VERSION_NUMBER:0:1}" != [8-9] && "${SYSTEM_VERSION_NUMBER:0:2}" != 1[0-2] ]]; then @@ -357,8 +357,10 @@ function EnvJudgment() { if [[ "${SYSTEM_ID}" != "opensuse-leap" && "${SYSTEM_ID}" != "opensuse-tumbleweed" ]]; then Output_Error "当前系统版本不在本脚本的支持范围内" else - if [[ "${SYSTEM_VERSION_NUMBER:0:2}" != 15 ]]; then - Output_Error "当前系统版本不在本脚本的支持范围内" + if [[ "${SYSTEM_ID}" == "opensuse-leap" ]]; then + if [[ "${SYSTEM_VERSION_NUMBER:0:2}" != 15 ]]; then + Output_Error "当前系统版本不在本脚本的支持范围内" + fi fi fi ;; @@ -1047,22 +1049,20 @@ function UpdateSoftware() { } ## Arch Linux 和 Red Hat Enterprise Linux 系统不更新软件包 - case "${SYSTEM_FACTIONS}" in - "${SYSTEM_DEBIAN}" | "${SYSTEM_REDHAT}" | "${SYSTEM_OPENCLOUDOS}" | "${SYSTEM_OPENEULER}" | "${SYSTEM_OPENSUSE}") - if [[ "${SYSTEM_JUDGMENT}" != "${SYSTEM_RHEL}" ]]; then - if [[ "${UPDATA_SOFTWARE}" == "true" ]]; then - Main - if [[ "${CLEAN_CACHE}" == "true" ]]; then - CleanCache - elif [[ -z "${CLEAN_CACHE}" ]]; then - CleanCacheInteraction - fi - elif [[ -z "${UPDATA_SOFTWARE}" ]]; then - MainInteraction + if [[ "${UPDATA_SOFTWARE}" == "true" ]]; then + Main + if [[ "${CLEAN_CACHE}" == "true" ]]; then + CleanCache + elif [[ -z "${CLEAN_CACHE}" ]]; then + if [[ "${SYSTEM_JUDGMENT}" != "${SYSTEM_ARCH}" && "${SYSTEM_JUDGMENT}" != "${SYSTEM_RHEL}" ]]; then + CleanCacheInteraction fi fi - ;; - esac + elif [[ -z "${UPDATA_SOFTWARE}" ]]; then + if [[ "${SYSTEM_JUDGMENT}" != "${SYSTEM_ARCH}" && "${SYSTEM_JUDGMENT}" != "${SYSTEM_RHEL}" ]]; then + MainInteraction + fi + fi } ## 运行结束 @@ -4255,15 +4255,6 @@ EOF ## 生成 openEuler 官方 repo 源文件 function GenRepoFiles_openEuler() { cat >$Dir_YumRepos/openEuler.repo <<\EOF -#generic-repos is licensed under the Mulan PSL v2. -#You can use this software according to the terms and conditions of the Mulan PSL v2. -#You may obtain a copy of Mulan PSL v2 at: -# http://license.coscl.org.cn/MulanPSL2 -#THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR -#IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR -#PURPOSE. -#See the Mulan PSL v2 for more details. - [OS] name=OS baseurl=http://repo.openeuler.org/openEuler-$releasever/OS/$basearch/ diff --git a/README.md b/README.md index f75f35c..a9f069d 100644 --- a/README.md +++ b/README.md @@ -16,51 +16,51 @@ - + - + - + - + - + - + - - + + - - + + - - + + - + - + - +
 Debian Debian 8.0 ~ 12
 Ubuntu Ubuntu 14.04 ~ 23
 Kali Linux Kali Linux 2.0 ~ 2023
 Red Hat Enterprise Linux Red Hat Enterprise Linux 7.0 ~ 9
 Fedora Fedora 30 ~ 38
 CentOS CentOS 7.0 ~ 8.5 / Stream 8 ~ 9
 Rocky Linux8.0 ~ 9 Rocky Linux8 ~ 9
 AlmaLinux8.0 ~ 9 AlmaLinux8 ~ 9
 OpenCloudOS8.0 ~ 9 OpenCloudOS8.6 / 9.0
 openEuler openEuler 21.03 ~ 23
 openSUSE openSUSE Leep 15 / Tumbleweed
 Arch Linux Arch Linux all
@@ -68,7 +68,7 @@ - #### [软件源](https://linuxmirrors.cn/mirrors) - #### [使用方法](https://linuxmirrors.cn/use) - #### [常见问题](https://linuxmirrors.cn/help) -- #### [其它脚本](https://linuxmirrors.cn/other) +- #### [Docker 一键安装(额外脚本)](https://linuxmirrors.cn/other) *** @@ -77,6 +77,6 @@ ### LICENSE Copyright © 2023, [SuperManito](https://github.com/SuperManito). Released under the [MIT](https://github.com/SuperManito/LinuxMirrors/blob/main/LICENSE). -如有意见与建议您可以提交至 [Issues](https://github.com/SuperManito/LinuxMirrors/issues),如果您需要提交您的代码请前往 GitHub 仓库提交 [Pull Requests](https://github.com/SuperManito/LinuxMirrors/pulls) +如有意见与建议你可以提交至 [Issues](https://github.com/SuperManito/LinuxMirrors/issues),如果你需要提交代码请前往 GitHub 仓库提交 [Pull Requests](https://github.com/SuperManito/LinuxMirrors/pulls) __如果您觉得这个项目不错对您有所帮助的话,方便在右上角给颗 ⭐ 并分享给更多的朋友吗?__ diff --git a/docs/help/index.md b/docs/help/index.md index 77c7ad2..92421ae 100644 --- a/docs/help/index.md +++ b/docs/help/index.md @@ -13,7 +13,7 @@ hide: apt-get install -y curl ``` - `Debian`   `Ubuntu`   `Kali` + > `Debian`   `Ubuntu`   `Kali` === "RedHat 系 Linux / OpenCloudOS / openEuler" @@ -21,7 +21,7 @@ hide: yum install -y curl || dnf install -y curl ``` - `Red Hat Enterprise Linux`   `CentOS`   `Rocky Linux`   `Fedora`   `openEuler` + > `Red Hat Enterprise Linux`   `CentOS`   `Rocky Linux`   `AlmaLinux`   `Fedora`   `OpenCloudOS`   `openEuler` === "openSUSE" @@ -44,7 +44,7 @@ hide: apt-get update ``` - `Debian`   `Ubuntu`   `Kali` + > `Debian`   `Ubuntu`   `Kali` === "RedHat 系 Linux / OpenCloudOS / openEuler" @@ -53,7 +53,7 @@ hide: yum makecache ``` - `Red Hat Enterprise Linux`   `CentOS`   `Rocky Linux`   `Fedora`   `openEuler` + > `Red Hat Enterprise Linux`   `CentOS`   `Rocky Linux`   `AlmaLinux`   `Fedora`   `OpenCloudOS`   `openEuler` === "openSUSE" diff --git a/docs/index.md b/docs/index.md index 31dc579..3dd4885 100644 --- a/docs/index.md +++ b/docs/index.md @@ -15,55 +15,56 @@ GNU/Linux 一键更换系统软件源脚本 !!! example inline end "适配计划" - - [ ] AnolisOS + 暂无计划适配更多系统或版本 + 如果你有需求那么请提交 [Issues](https://github.com/SuperManito/LinuxMirrors/issues) - + - + - + - + - + - + - - + + - - + + - - + + - + - + - +
 Debian Debian 8.0 ~ 12
 Ubuntu Ubuntu 14.04 ~ 23
 Kali Linux Kali Linux 2.0 ~ 2023
 Red Hat Enterprise Linux Red Hat Enterprise Linux 7.0 ~ 9
 Fedora Fedora 30 ~ 38
 CentOS CentOS 7.0 ~ 8.5 / Stream 8 ~ 9
 Rocky Linux8.0 ~ 9 Rocky Linux8 ~ 9
 AlmaLinux8.0 ~ 9 AlmaLinux8 ~ 9
 OpenCloudOS8.0 ~ 9 OpenCloudOS8.6 / 9.0
 openEuler openEuler 21.03 ~ 23
 openSUSE openSUSE Leep 15 / Tumbleweed
 Arch Linux Arch Linux all
@@ -72,6 +73,6 @@ GNU/Linux 一键更换系统软件源脚本 点击列表中的图标可快速前往其官网,理论支持所有架构的环境 项目已设立开源许可协议,传播时请在显著位置标注来源和作者,请尊重作者的知识成果,建议通过命令直接调用脚本 -如有意见与建议您可以提交至 [Issues](https://github.com/SuperManito/LinuxMirrors/issues),如果您需要提交您的代码请前往 GitHub 仓库提交 [Pull Requests](https://github.com/SuperManito/LinuxMirrors/pulls) +如有意见与建议你可以提交至 [Issues](https://github.com/SuperManito/LinuxMirrors/issues),如果你需要提交代码请前往 GitHub 仓库提交 [Pull Requests](https://github.com/SuperManito/LinuxMirrors/pulls) [开始使用](/use){ .md-button .md-button--primary } [软件源](/Mirrors){ .md-button } diff --git a/docs/mirrors.md b/docs/mirrors.md index e7a4c1d..7d54f0d 100644 --- a/docs/mirrors.md +++ b/docs/mirrors.md @@ -6,29 +6,29 @@ hide: ## 中国大陆 :flag-CN: -| | 镜像站名称 | 镜像站地址 | IPv6 | Kali | Rocky | AlmaLinux | EPEL | Fedora | openEuler | OpenCloudOS | -| :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | -| 1 | 阿里云 | [mirrors.aliyun.com](https://developer.aliyun.com/mirror) | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-circle-off-outline:{style="color: #F6B604"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-close:{style="color: #EF5350"} | -| 2 | 腾讯云 | [mirrors.tencent.com](https://mirrors.tencent.com) | :material-close:{style="color: #EF5350"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | -| 3 | 华为云 | [mirrors.huaweicloud.com](https://mirrors.huaweicloud.com) | :material-close:{style="color: #EF5350"} | :material-check:{style="color: #4DB6AC"} | :material-circle-off-outline:{style="color: #F6B604"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-close:{style="color: #EF5350"} | -| 4 | 网易 | [mirrors.163.com](https://mirrors.163.com) | :material-close:{style="color: #EF5350"} | :material-close:{style="color: #EF5350"} | :material-check:{style="color: #4DB6AC"} | :material-close:{style="color: #EF5350"} | :material-close:{style="color: #EF5350"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-close:{style="color: #EF5350"} | -| 5 | 搜狐 | [mirrors.sohu.com](https://mirrors.sohu.com) | :material-close:{style="color: #EF5350"} | :material-close:{style="color: #EF5350"} | :material-circle-off-outline:{style="color: #F6B604"} | :material-close:{style="color: #EF5350"} | :material-close:{style="color: #EF5350"} | :material-check:{style="color: #4DB6AC"} | :material-close:{style="color: #EF5350"} | :material-close:{style="color: #EF5350"} | -| 6 | 清华大学 | [mirrors.tuna.tsinghua.edu.cn](https://mirrors.tuna.tsinghua.edu.cn) | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-close:{style="color: #EF5350"} | :material-close:{style="color: #EF5350"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-close:{style="color: #EF5350"} | -| 7 | 北京大学 | [mirrors.pku.edu.cn](https://mirrors.pku.edu.cn/Mirrors) | :material-check:{style="color: #4DB6AC"} | :material-close:{style="color: #EF5350"} | :material-close:{style="color: #EF5350"} | :material-close:{style="color: #EF5350"} | :material-check:{style="color: #4DB6AC"} | :material-close:{style="color: #EF5350"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | -| 8 | 浙江大学 | [mirrors.zju.edu.cn](https://mirrors.zju.edu.cn) | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-close:{style="color: #EF5350"} | -| 9 | 南京大学 | [mirrors.nju.edu.cn](https://mirrors.nju.edu.cn) | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-close:{style="color: #EF5350"} | -| 10 | 重庆大学 | [mirrors.cqu.edu.cn](https://mirrors.cqu.edu.cn) | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-circle-off-outline:{style="color: #F6B604"} | :material-close:{style="color: #EF5350"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-close:{style="color: #EF5350"} | :material-close:{style="color: #EF5350"} | -| 11 | 兰州大学 | [mirror.lzu.edu.cn](https://mirror.lzu.edu.cn) | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-close:{style="color: #EF5350"} | -| 12 | 上海交通大学 | [mirror.sjtu.edu.cn](https://mirror.sjtu.edu.cn) | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | -| 13 | 哈尔滨工业大学 | [mirrors.hit.edu.cn](https://mirrors.hit.edu.cn) | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-close:{style="color: #EF5350"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-close:{style="color: #EF5350"} | -| 14 | 中国科学技术大学 | [mirrors.ustc.edu.cn](https://mirrors.ustc.edu.cn) | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-close:{style="color: #EF5350"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-close:{style="color: #EF5350"} | -| 15 | 中国科学院软件研究所 | [mirror.iscas.ac.cn](https://mirror.iscas.ac.cn) | :material-close:{style="color: #EF5350"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-close:{style="color: #EF5350"} | +| | 镜像站名称 | IPv6 | Kali | Rocky | AlmaLinux | EPEL | Fedora | openEuler | OpenCloudOS | +| :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | +| 1 | [阿里云](https://mirrors.aliyun.com) | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-circle-off-outline:{style="color: #F6B604"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-close:{style="color: #EF5350"} | +| 2 | [腾讯云](https://mirrors.tencent.com) | :material-close:{style="color: #EF5350"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | +| 3 | [华为云](https://mirrors.huaweicloud.com) | :material-close:{style="color: #EF5350"} | :material-check:{style="color: #4DB6AC"} | :material-circle-off-outline:{style="color: #F6B604"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-close:{style="color: #EF5350"} | +| 4 | [网易](https://mirrors.163.com) | :material-close:{style="color: #EF5350"} | :material-close:{style="color: #EF5350"} | :material-check:{style="color: #4DB6AC"} | :material-close:{style="color: #EF5350"} | :material-close:{style="color: #EF5350"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-close:{style="color: #EF5350"} | +| 5 | [搜狐](https://mirrors.sohu.com) | :material-close:{style="color: #EF5350"} | :material-close:{style="color: #EF5350"} | :material-circle-off-outline:{style="color: #F6B604"} | :material-close:{style="color: #EF5350"} | :material-close:{style="color: #EF5350"} | :material-check:{style="color: #4DB6AC"} | :material-close:{style="color: #EF5350"} | :material-close:{style="color: #EF5350"} | +| 6 | [清华大学](https://mirrors.tuna.tsinghua.edu.cn) | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-close:{style="color: #EF5350"} | :material-close:{style="color: #EF5350"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-close:{style="color: #EF5350"} | +| 7 | [北京大学](https://mirrors.pku.edu.cn/Mirrors) | :material-check:{style="color: #4DB6AC"} | :material-close:{style="color: #EF5350"} | :material-close:{style="color: #EF5350"} | :material-close:{style="color: #EF5350"} | :material-check:{style="color: #4DB6AC"} | :material-close:{style="color: #EF5350"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | +| 8 | [浙江大学](https://mirrors.zju.edu.cn) | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-close:{style="color: #EF5350"} | +| 9 | [南京大学](https://mirrors.nju.edu.cn) | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-close:{style="color: #EF5350"} | +| 10 | [重庆大学](https://mirrors.cqu.edu.cn) | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-circle-off-outline:{style="color: #F6B604"} | :material-close:{style="color: #EF5350"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-close:{style="color: #EF5350"} | :material-close:{style="color: #EF5350"} | +| 11 | [兰州大学](https://mirror.lzu.edu.cn) | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-close:{style="color: #EF5350"} | +| 12 | [上海交通大学](https://mirror.sjtu.edu.cn) | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | +| 13 | [哈尔滨工业大学](https://mirrors.hit.edu.cn) | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-close:{style="color: #EF5350"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-close:{style="color: #EF5350"} | +| 14 | [中国科学技术大学](https://mirrors.ustc.edu.cn) | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-close:{style="color: #EF5350"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-close:{style="color: #EF5350"} | +| 15 | [中国科学院软件研究所](https://mirror.iscas.ac.cn) | :material-close:{style="color: #EF5350"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-close:{style="color: #EF5350"} | -上述列表中的镜像站均支持 `Debian` `Ubuntu` `CentOS` `openSUSE` `Arch Linux` 软件源,列表根据单位性质、地理位置、名称长度进行排序与实际速度无关,目前没有扩充计划 +???+ question "使用帮助" -!!! question "使用帮助" + :material-check:{style="color: #4DB6AC"} 支持    :material-close:{style="color: #EF5350"} 不支持    :material-circle-off-outline:{style="color: #F6B604"} 表示软件源分支命名不符合脚本默认规则,但可以通过命令参数来使用,关于具体用法示例和各操作系统所使用的默认分支名称[详见此处](../use/command-options/#%E6%8C%87%E5%AE%9A%E8%BD%AF%E4%BB%B6%E6%BA%90%E5%88%86%E6%94%AF) - :material-check:{style="color: #4DB6AC"} 支持    :material-close:{style="color: #EF5350"} 不支持    :material-circle-off-outline:{style="color: #F6B604"} 表示软件源分支命名不符合脚本默认规则,但可以通过命令参数来使用,具体详见[用法示例](../use/command-options/#%E6%8C%87%E5%AE%9A%E8%BD%AF%E4%BB%B6%E6%BA%90%E5%88%86%E6%94%AF),关于各操作系统针对软件源(镜像站)所使用的默认分支名称[详见此处](../use/command-options/#%E6%8C%87%E5%AE%9A%E8%BD%AF%E4%BB%B6%E6%BA%90%E5%88%86%E6%94%AF) + 上述列表中的镜像站均支持 `Debian` `Ubuntu` `CentOS` `openSUSE` `Arch Linux` 软件源,列表根据单位性质、地理位置、名称长度进行排序与实际速度无关,目前没有扩充计划 如果使用脚本过程中不能正常输出中文内容则可对照此列表使用,顺序与脚本一致,之后一路回车即可。如果这里没有你想使用的教育单位镜像站,那么你可以使用[国内教育网模式](/use/#%E5%9B%BD%E5%86%85%E6%95%99%E8%82%B2%E7%BD%91%E4%BD%BF%E7%94%A8)看看 @@ -141,7 +141,7 @@ hide: | 非洲 · Liquid Telecom · 肯尼亚 :flag-KE: | [mirror.liquidtelecom.com](https://mirror.liquidtelecom.com) | | 非洲 · Dimension Data · 南非 :flag-ZA: | [mirror.dimensiondata.com](https://mirror.dimensiondata.com) | -=== ":octicons-globe-16: 全部地区" +=== ":octicons-globe-16: 全部" | 镜像站名称 | 镜像站地址 | | :- | :-: | @@ -216,30 +216,32 @@ hide: | 非洲 · Liquid Telecom · 肯尼亚 :flag-KE: | [mirror.liquidtelecom.com](https://mirror.liquidtelecom.com) | | 非洲 · Dimension Data · 南非 :flag-ZA: | [mirror.dimensiondata.com](https://mirror.dimensiondata.com) | -该列表中的软件源参考自 [`Ubuntu 镜像列表`](https://launchpad.net/ubuntu/+cdmirrors)、[`Debian 镜像列表`](https://www.debian.org/CD/http-ftp/#mirrors)、[`Fedora Mirror Manager`](https://admin.fedoraproject.org/mirrormanager/mirrors) 并且全部经过了有效性验证,但未作实际测试 - ???+ note "帮助本项目完善更多海外软件源" - 如果你想补充更多海外软件源或更正当前已有,请修改脚本内的 [`mirror_list_abroad 数组变量`](https://github.com/SuperManito/LinuxMirrors/blame/main/ChangeMirrors.sh#L28) 并按照下面的编辑规范进行修改 - 你可以在确认软件源地址无误后前往 GitHub 仓库提交 [Pull Requests](https://github.com/SuperManito/LinuxMirrors/pulls),也可以 Fork 仓库后自行定制使用 + 该列表中的软件源参考自 [`Ubuntu 镜像列表`](https://launchpad.net/ubuntu/+cdmirrors)、[`Debian 镜像列表`](https://www.debian.org/CD/http-ftp/#mirrors)、[`Fedora Mirror Manager`](https://admin.fedoraproject.org/mirrormanager/mirrors) 并且全部经过了有效性验证,但未作实际测试 + + 如果你想补充更多海外软件源或更正当前已有,请修改脚本内的 [`mirror_list_abroad 数组变量`](https://github.com/SuperManito/LinuxMirrors/blame/main/ChangeMirrors.sh#L28) 并按照下面的编辑规范进行修改 + + 你可以在确认软件源地址无误后前往 GitHub 仓库提交 [Pull Requests](https://github.com/SuperManito/LinuxMirrors/pulls),也可以 :material-source-fork: Fork 仓库后自行定制使用 - 海外软件源编辑规范: - 通用格式:"洲 · 软件源名称 · 国家/地区@软件源地址" + 完整格式:`洲 · 软件源名称 · 国家/地区@软件源地址(域名)` - 请根据地理位置、国家/地区进行排序以便于用户选择,有标志性缩写字符的单位应在最后用括号补充,单位的名称应以域名作为优先原则,下面是命名规则 + 请根据地理位置、国家或地区进行排序以便于用户选择,有标志性缩写字符的单位应在最后用括号补充,单位的名称应以域名作为优先原则,下面是命名规则: - - 教育单位:需使用中文译名,全称中若含有国家/地区的名称则也要带上,注意区分下属单位例如学院、学生会、社团等,命名以域名为优先原则,常见的二级域名格式 `ftp/mirrors.xxx.xxx` 应直接采用顶级单位的名称,如果有三级域名则应考虑是否在名称中加上下属单位 + - 教育单位:需使用中文译名,全称中若含有国家或地区的名称则也要带上,注意区分下属单位,例如学院、学生会、社团等。常见的二级域名格式 `ftp/mirrors.xxx.xxx` 应直接采用顶级单位的名称,如果有三级域名则应考虑是否在名称中加上下属单位,以域名为优先原则 - 注:`Technology` 一词应称为 `理工` 而不能使用 `技术` 这一机翻结果 + 注:`Technology` 一词应称为 `理工` 而不能使用翻译结果的 `技术` 一词 - 非教育单位:应优先采用其上属官网所自称的英文品牌名称,注意是正式的英文名称不是logo中的字符,如果没有并且是除中文、英文以外的语言应使用域名作为名称 ## 工具网站 -!!! quote "" + + + + - [域名查询](https://tool.chinaz.com){ .md-button .md-button--primary } - [Ping 延迟测试](https://tools.ipip.net/newping.php){ .md-button .md-button--primary } - [Tracert 路由追踪测试](https://tools.ipip.net/traceroute.php){ .md-button .md-button--primary } - [IPv6 接入测试](https://ipw.cn/ipv6webcheck){ .md-button .md-button--primary } +!!! tip "" + 该页面展示的均为脚本默认提供可供选择的软件源地址,如果没有找到你想使用的也没有关系,脚本支持命令选项可自定义使用,详见[高级用法](/use/command-options)。 diff --git a/docs/stylesheets/extra.css b/docs/stylesheets/extra.css index 9f00734..02c9832 100644 --- a/docs/stylesheets/extra.css +++ b/docs/stylesheets/extra.css @@ -1,7 +1,35 @@ :root { --md-code-font: 'SF Mono'; } +[data-md-color-scheme='default'] { + --md-primary-fg-color: hsl(0, 0%, 100%, 0.33); +} +[data-md-color-scheme='slate'] .md-header { + background-color: hsla(232, 15%, 21%, 0.33); +} +[data-md-color-scheme='slate'] .md-tabs { + background-color: hsla(232, 15%, 21%, 0.33); + border-bottom: 0.05rem solid #68686842; +} @font-face { font-family: 'SF Mono'; src: url('./fonts/SF-Mono-Regular.otf'); } +@keyframes heart { + 0%, + 40%, + 80%, + 100% { + transform: scale(1); + } + 20%, + 60% { + transform: scale(1.15); + } +} +.heart { + animation: heart 1000ms infinite; +} +.md-header { + backdrop-filter: blur(8px); +} diff --git a/docs/use/command-options.md b/docs/use/command-options.md index 4f030ec..1c5ab03 100644 --- a/docs/use/command-options.md +++ b/docs/use/command-options.md @@ -14,7 +14,7 @@ | `--only-epel` | 仅更换 EPEL 软件源模式 | 无 | | `--close-firewall` | 关闭防火墙 | `true` 或 `false` | | `--backup` | 备份原有软件源 | `true` 或 `false` | -| `--ignore-backup-tips` | 忽略覆盖备份提示 | 无 | +| `--ignore-backup-tips` | 忽略覆盖备份提示(即不覆盖备份) | 无 | | `--updata-software` | 更新软件包 | `true` 或 `false` | | `--clean-cache` | 清理下载缓存 | `true` 或 `false` | | `--print-diff` | 打印源文件修改前后差异 | `true` 或 `false` | @@ -108,9 +108,9 @@ bash <(curl -sSL https://linuxmirrors.cn/main.sh) --only-epel ### 自定义 Debian Security 源 -如果你想提高服务器的安全性请尽可能使用官方源,因为镜像同步存在延迟 +如果你想尽可能提高服务器的安全性则建议使用官方源,因为镜像同步存在延迟 -``` bash title="官方源" +``` bash bash <(curl -sSL https://linuxmirrors.cn/main.sh) \ --source-security security.debian.org \ --branch-security debian-security diff --git a/docs/use/index.md b/docs/use/index.md index 9f72773..4327e33 100644 --- a/docs/use/index.md +++ b/docs/use/index.md @@ -9,22 +9,24 @@ bash <(curl -sSL https://linuxmirrors.cn/main.sh) ### 海外使用 ``` bash -bash <(curl -sSL https://linuxmirrors.cn/main.sh) --abroad +bash <(curl -sSL https://linuxmirrors.cn/main.sh) --abroad # (1)! ``` -> 通过 `--abroad` 命令选项来使用海外软件源 + +1. 通过 `--abroad` 命令选项来使用海外软件源 ### 国内教育网使用 ``` bash -bash <(curl -sSL https://linuxmirrors.cn/main.sh) --edu +bash <(curl -sSL https://linuxmirrors.cn/main.sh) --edu # (1)! ``` -> 通过 `--edu` 命令选项来使用中国教育单位软件源 + +1. 通过 `--edu` 命令选项来使用中国教育单位软件源 ## 注意事项 - 完整复制上面的命令到终端按回车键即可执行,若无法安装 `curl` 软件包可复制源码到本地后通过 `bash` 手动执行 - 为了适配所有环境,需要使用 `Root` 用户执行脚本,切换命令为 `su root`,如遇报错请查看常见问题与帮助 -- 如果您使用的环境没有安装或不支持简体中文环境,请通过 `SSH客户端工具` 使用,否则将无法正确选择交互内容 +- 如果你使用的环境没有安装或不支持简体中文环境,请通过 `SSH客户端工具` 使用,否则将无法正确选择交互内容 - 执行脚本过程中会自动备份原有源无需手动备份,期间会在终端输出多个主观选择交互内容,可按回车键快速确定 - 脚本支持在原有源配置错误或者不存在的情况下使用,并且可以重复使用;脚本变更的软件源默认使用 `HTTP` 协议 @@ -33,3 +35,7 @@ bash <(curl -sSL https://linuxmirrors.cn/main.sh) --edu ``` bash bash <(curl -sSL https://gitee.com/SuperManito/LinuxMirrors/raw/main/ChangeMirrors.sh) ``` + +!!! danger "" + + :octicons-heart-fill-24:{ .heart style="color: red" } 如果您觉得这个项目不错对您有所帮助的话,方便在仓库右上角给颗 ⭐ 并分享给更多的朋友吗? diff --git a/docs/use/not-enabled.md b/docs/use/not-enabled.md index 106820a..57097cc 100644 --- a/docs/use/not-enabled.md +++ b/docs/use/not-enabled.md @@ -4,13 +4,13 @@ 默认禁用了`deb-src`源码仓库和`proposed`预发布软件源,若需启用请将 `/etc/apt/sources.list` 文件中相关内容的所在行取消注释 - `Debian`   `Ubuntu`   `Kali` + > `Debian`   `Ubuntu`   `Kali` === "RedHat 系 Linux / OpenCloudOS / openEuler" 部分仓库默认没有启用,若需启用请将 `/etc/yum.repos.d` 目录下相关 repo 文件中的 `enabled` 值修改为 `1` - `Red Hat Enterprise Linux`   `CentOS`   `Rocky Linux`   `Fedora`   `openEuler` + > `Red Hat Enterprise Linux`   `CentOS`   `Rocky Linux`   `AlmaLinux`   `Fedora`   `OpenCloudOS`   `openEuler` === "openSUSE" diff --git a/mkdocs.yml b/mkdocs.yml index f48ab67..a8914f2 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -31,13 +31,13 @@ theme: - scheme: default primary: white toggle: - icon: material/brightness-7 + icon: octicons/sun-16 name: Switch to dark mode # Palette toggle for dark mode - scheme: slate primary: indigo toggle: - icon: material/brightness-4 + icon: octicons/moon-16 name: Switch to light mode features: - header.autohide @@ -69,7 +69,7 @@ extra_css: markdown_extensions: - toc: permalink: '#' - permalink_title: 复制链接 + permalink_title: 永久链接 slugify: !!python/object/apply:pymdownx.slugs.slugify kwds: case: lower @@ -112,6 +112,9 @@ plugins: - search: lang: en separator: '[\s\-,:!=\[\]()"/]+|(?!\b)(?=[A-Z][a-z])|\.(?!\d)|&[lg]t;' + - exclude-search: + exclude: + - mirrors.md - tags - glightbox nav: