This commit is contained in:
Super Manito
2022-01-24 06:38:31 +08:00
parent 1f7714a6f4
commit fbade88f1c
6 changed files with 42 additions and 32 deletions

View File

@@ -85,20 +85,25 @@
- `GNU/Linux` 一键更换国内软件源脚本 - `GNU/Linux` 一键更换国内软件源脚本
bash <(curl -sSL https://gitee.com/SuperManito/LinuxMirrors/raw/main/ChangeMirrors.sh) ```bash
> __注意__ bash <(curl -sSL https://cdn.jsdelivr.net/gh/SuperManito/LinuxMirrors@main/ChangeMirrors.sh)
> - _Debian 系 Linux 默认禁用了源码仓库和预发布软件源,若需启用可将 list 源文件中相关内容的所在行 `取消注释`。_ ```
> - _RedHat 系 Linux 配置了所有可以配置的仓库,但有一些仓库默认没有启用,若需启用可将 repo 源文件中的 `enabled=0`修改成 `enabled=1`。_
> __注意__
> - _Debian 系 Linux 默认禁用了源码仓库和预发布软件源,若需启用请将 list 源文件中相关内容的所在行 `取消注释`。_
> - _RedHat 系 Linux 配置了所有可以配置的仓库,但有一些仓库默认没有启用,若需启用请将 repo 源文件中的 `enabled=0`修改成 `enabled=1`。_
*** ***
### 其它脚本 ### 其它脚本
- `Docker` 一键安装脚本 - `Docker` 一键安装脚本
bash <(curl -sSL https://gitee.com/SuperManito/LinuxMirrors/raw/main/DockerInstallation.sh) ```bash
bash <(curl -sSL https://cdn.jsdelivr.net/gh/SuperManito/LinuxMirrors@main/DockerInstallation.sh)
```
> `Docker CE`Docker Community Edition 镜像仓库,用于下载并安装 Docker 相关软件包。\ > `Docker CE`Docker Community Edition 镜像仓库,用于下载并安装 Docker 相关软件包。\
> `Docker Hub`Docker Hub 镜像仓库,默认为官方提供的公共库,用于切换下载镜像时的来源仓库,简称镜像加速器。 > `Docker Hub`Docker Hub 镜像仓库,默认为官方提供的公共库,用于切换下载镜像时的来源仓库,简称镜像加速器。
> _注意脚本集成安装 `Docker Engine`与 `Docker Compose`,可手动选择安装版本和下载源,还可手动选择镜像加速器,支持国内外服务器环境和 `ARM`架构处理器环境使用。_ > _注意脚本集成安装 `Docker Engine`与 `Docker Compose`,可手动选择安装版本和下载源,还可手动选择镜像加速器,支持国内外服务器环境和 `ARM`架构处理器环境使用。_
@@ -107,20 +112,24 @@
### 常见问题与帮助 ### 常见问题与帮助
- 如果提示 `Command 'curl' not found` 则说明当前未安装 `curl` 软件包 - 如果提示 `Command 'curl' not found` 则说明当前未安装 `curl` 软件包
sudo apt install -y curl 或 sudo yum install -y curl ```bash
sudo yum install -y curl || sudo apt install -y curl
```
- 如果提示 `Command 'wget' not found` 则说明当前未安装 `wget` 软件包 - 如果提示 `Command 'wget' not found` 则说明当前未安装 `wget` 软件包
sudo apt install -y wget 或 sudo yum install -y wget ```bash
sudo yum install -y wget || sudo apt install -y wget
```
- 如果提示 `bash: /proc/self/fd/11: No such file or directory`,请切换至 `Root` 用户执行。 - 如果提示 `bash: /proc/self/fd/11: No such file or directory`,请切换至 `Root` 用户执行。
*** ***
### License ### License
Copyright © 2021, [SuperManito](https://github.com/SuperManito). Released under the [GPL-2.0](https://github.com/SuperManito/LinuxMirrors/blob/main/LICENSE). Copyright © 2022, [SuperManito](https://github.com/SuperManito). Released under the [GPL-2.0](https://github.com/SuperManito/LinuxMirrors/blob/main/LICENSE).
> 项目已设立开源许可协议,传播时需在显著位置标注来源和作者,请尊重本人的知识成果\ > 项目已设立开源许可协议,传播时需在显著位置标注来源和作者,请尊重本人的知识成果\
> 建议通过命令直接调用脚本,如有意见与建议您可以提交至 __Issues__谢谢 > 建议通过命令直接调用脚本,如有意见与建议您可以提交至 [Issues](https://github.com/SuperManito/LinuxMirrors/issues)
*** ***

View File

@@ -73,7 +73,7 @@
## 如何使用 ## 如何使用
```bash ```bash
bash <(curl -sSL https://gitee.com/SuperManito/LinuxMirrors/raw/main/ChangeMirrors.sh) bash <(curl -sSL https://cdn.jsdelivr.net/gh/SuperManito/LinuxMirrors@main/ChangeMirrors.sh)
``` ```
- 1. 完整复制上面的命令到终端按回车键即可执行,若无法安装 `curl` 软件包可复制源码到本地后手动执行。 - 1. 完整复制上面的命令到终端按回车键即可执行,若无法安装 `curl` 软件包可复制源码到本地后手动执行。
@@ -82,15 +82,14 @@ bash <(curl -sSL https://gitee.com/SuperManito/LinuxMirrors/raw/main/ChangeMirro
- 4. 执行脚本过程中会自动备份原有源无需手动备份,期间会在终端输出多个主观选择交互内容,可按回车键快速确认。 - 4. 执行脚本过程中会自动备份原有源无需手动备份,期间会在终端输出多个主观选择交互内容,可按回车键快速确认。
- 5. 脚本支持在原有源配置错误或者不存在的情况下使用,并且可以重复使用;脚本变更的软件源默认使用 `HTTP 协议` - 5. 脚本支持在原有源配置错误或者不存在的情况下使用,并且可以重复使用;脚本变更的软件源默认使用 `HTTP 协议`
> **Debian** 系 Linux 默认禁用了**源码仓库**和**预发布软件源**,若需启用将 `list` 源文件中相关内容的所在行**取消注释** > **Debian** 系 Linux 默认禁用了**源码仓库**和**预发布软件源**,若需启用将 `list` 源文件中相关内容的所在行**取消注释**\
> **RedHat** 系 Linux 配置了所有可以配置的仓库,但有一些仓库**默认没有启用**,若需启用请将 `repo` 源文件中的 `enabled=0` 修改成 `enabled=1`
> **RedHat** 系 Linux 配置了所有可以配置的仓库,但有一些仓库**默认没有启用**,若需启用可将 `repo` 源文件中的 `enabled=0` 修改成 `enabled=1`
## 其它脚本 ## 其它脚本
- #### `Docker` 一键安装脚本 <!-- {docsify-ignore} --> - #### `Docker` 一键安装脚本 <!-- {docsify-ignore} -->
```bash ```bash
bash <(curl -sSL https://gitee.com/SuperManito/LinuxMirrors/raw/main/DockerInstallation.sh) bash <(curl -sSL https://cdn.jsdelivr.net/gh/SuperManito/LinuxMirrors@main/DockerInstallation.sh)
``` ```
> `Docker CE`Docker Community Edition 镜像仓库,用于下载并安装 Docker 相关软件包。\ > `Docker CE`Docker Community Edition 镜像仓库,用于下载并安装 Docker 相关软件包。\
@@ -102,21 +101,21 @@ bash <(curl -sSL https://gitee.com/SuperManito/LinuxMirrors/raw/main/ChangeMirro
- #### 如果提示 `Command 'curl' not found` 则说明当前未安装 `curl` 软件包 <!-- {docsify-ignore} --> - #### 如果提示 `Command 'curl' not found` 则说明当前未安装 `curl` 软件包 <!-- {docsify-ignore} -->
```bash ```bash
sudo apt install -y curl sudo yum install -y curl sudo yum install -y curl || sudo apt install -y curl
``` ```
- #### 如果提示 `Command 'wget' not found` 则说明当前未安装 `wget` 软件包 <!-- {docsify-ignore} --> - #### 如果提示 `Command 'wget' not found` 则说明当前未安装 `wget` 软件包 <!-- {docsify-ignore} -->
```bash ```bash
sudo apt install -y wget sudo yum install -y wget sudo yum install -y wget || sudo apt install -y wget
``` ```
- #### 如果提示 `bash: /proc/self/fd/11: No such file or directory`,请切换至 `Root` 用户执行。 <!-- {docsify-ignore} --> - #### 如果提示 `bash: /proc/self/fd/11: No such file or directory`,请切换至 `Root` 用户执行。 <!-- {docsify-ignore} -->
## License ## License
Copyright © 2021, [SuperManito](https://github.com/SuperManito). Released under the [GPL-2.0](https://github.com/SuperManito/LinuxMirrors/blob/main/LICENSE) Copyright © 2022, [SuperManito](https://github.com/SuperManito). Released under the [GPL-2.0](https://github.com/SuperManito/LinuxMirrors/blob/main/LICENSE)
> 项目已设立开源许可协议,传播时需在显著位置标注来源和作者,请尊重本人的知识成果\ > 项目已设立开源许可协议,传播时需在显著位置标注来源和作者,请尊重本人的知识成果\
> 建议通过命令直接调用脚本,如有意见与建议您可以提交至 __Issues__ ,谢谢 > 建议通过命令直接调用脚本,如有意见与建议您可以提交至 [Issues](https://github.com/SuperManito/LinuxMirrors/issues)
*** ***

View File

@@ -3,7 +3,9 @@
&nbsp;<a href="https://github.com/SuperManito/LinuxMirrors"><img src="./img/icon/github-2.svg" width="70" height="52"></a> &nbsp;<a href="https://github.com/SuperManito/LinuxMirrors"><img src="./img/icon/github-2.svg" width="70" height="52"></a>
&nbsp;&nbsp;&nbsp;<a href="https://gitee.com/SuperManito/LinuxMirrors"><img src="./img/icon/gitee.svg" width="100" height="50"/></a> &nbsp;&nbsp;&nbsp;<a href="https://gitee.com/SuperManito/LinuxMirrors"><img src="./img/icon/gitee.svg" width="100" height="50"/></a>
> 脚本一键更换 Linux 软件源,让换源更简单 ### 脚本一键更换 Linux 软件源
### 让换源更简单
[Github](https://github.com/SuperManito/LinuxMirrors) [Github](https://github.com/SuperManito/LinuxMirrors)
[Gitee](https://gitee.com/SuperManito/LinuxMirrors) [Gitee](https://gitee.com/SuperManito/LinuxMirrors)

File diff suppressed because one or more lines are too long

View File

@@ -3,7 +3,7 @@
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<title>LinuxMirror · 让换源更简单</title> <title>LinuxMirrors · 让换源更简单</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="description" content="Description"> <meta name="description" content="Description">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
@@ -21,8 +21,6 @@
logo: './img/logo.png', logo: './img/logo.png',
// 加载封面 // 加载封面
coverpage: true, coverpage: true,
// 主题色
themeColor: '#1e90ff',
// 小屏幕设备自动合并导航栏到侧边栏 // 小屏幕设备自动合并导航栏到侧边栏
mergeNavbar: true, mergeNavbar: true,
// 启用自定义404页 // 启用自定义404页
@@ -59,7 +57,7 @@
codeFontFamily: 'Roboto Mono, Monaco, courier, monospace', codeFontFamily: 'Roboto Mono, Monaco, courier, monospace',
bodyFontSize: '17px', bodyFontSize: '17px',
light: { light: {
accent: '#1e90ff', themeColor: '#1e90ff',
toogleBackground: '#091a28', toogleBackground: '#091a28',
background: '#ffffff', background: '#ffffff',
textColor: '#34495e', textColor: '#34495e',
@@ -70,11 +68,12 @@
highlightColor: '#d22778', highlightColor: '#d22778',
sidebarSublink: '#7c7c7c', sidebarSublink: '#7c7c7c',
codeTypeColor: '#091a28', codeTypeColor: '#091a28',
coverBackground: 'linear-gradient(to left bottom, hsl(118, 100%, 85%) 0%,hsl(181, 100%, 85%) 100%)', herfColor: '#2973b7',
coverBackground: 'linear-gradient(to top, #fff1eb 0%, #ace0f9 100%)',
toogleImage: 'url(https://cdn.jsdelivr.net/npm/docsify-darklight-theme@latest/icons/moon.svg)', toogleImage: 'url(https://cdn.jsdelivr.net/npm/docsify-darklight-theme@latest/icons/moon.svg)',
}, },
dark: { dark: {
accent: '#42b983', themeColor: '#42b983',
toogleBackground: '#ffffff', toogleBackground: '#ffffff',
background: '#091a28', background: '#091a28',
textColor: '#b4b4b4', textColor: '#b4b4b4',
@@ -85,7 +84,8 @@
highlightColor: '#a6bb06', highlightColor: '#a6bb06',
sidebarSublink: '#b4b4b4', sidebarSublink: '#b4b4b4',
codeTypeColor: '#ffffff', codeTypeColor: '#ffffff',
coverBackground: 'linear-gradient(to left bottom, hsl(118, 100%, 85%) 0%,hsl(181, 100%, 85%) 100%)', herfColor: '#16995e',
coverBackground: 'linear-gradient(to top, #fff1eb 0%, #ace0f9 100%)',
toogleImage: 'url(https://cdn.jsdelivr.net/npm/docsify-darklight-theme@latest/icons/sun.svg)', toogleImage: 'url(https://cdn.jsdelivr.net/npm/docsify-darklight-theme@latest/icons/sun.svg)',
} }
} }

View File

@@ -5,5 +5,5 @@
* (c) 2017-2020 JP Erasmus <jperasmus11@gmail.com> * (c) 2017-2020 JP Erasmus <jperasmus11@gmail.com>
* MIT license * MIT license
*/ */
!function(){function s(o){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o})(o)}!function(o,e){void 0===e&&(e={});var t=e.insertAt;if(o&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],c=document.createElement("style");c.type="text/css","top"===t&&n.firstChild?n.insertBefore(c,n.firstChild):n.appendChild(c),c.styleSheet?c.styleSheet.cssText=o:c.appendChild(document.createTextNode(o))}}(".docsify-copy-code-button,.docsify-copy-code-button span{cursor:pointer;transition:all .25s ease}.docsify-copy-code-button{position:absolute;z-index:1;top:1.5em;right:.5em;overflow:visible;padding:.2em .4em;border:0;border-radius:3px;outline:0;font-size:1em;background:#8d8d8d2e;color:var(--accent);opacity:0}.docsify-copy-code-button span{border-radius:7px;pointer-events:none}.docsify-copy-code-button .error,.docsify-copy-code-button .success{position:absolute;z-index:-100;top:50%;right:0;padding:.5em .65em;font-size:.825em;opacity:0;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.docsify-copy-code-button.error .error{right:60%;opacity:1;-webkit-transform:translate(-115%,-50%);color:red;background-color:#8d8d8d2e;transform:translate(-115%,-50%)}.docsify-copy-code-button.success .success{right:60%;opacity:1;-webkit-transform:translate(-115%,-50%);color:#00a300;background-color:#8d8d8d2e;transform:translate(-115%,-50%)}.docsify-copy-code-button:focus,pre:hover .docsify-copy-code-button{opacity:1}"),document.querySelector('link[href*="docsify-copy-code"]')&&console.warn("[Deprecation] Link to external docsify-copy-code stylesheet is no longer necessary."),window.DocsifyCopyCodePlugin={init:function(){return function(o,e){o.ready(function(){console.warn("[Deprecation] Manually initializing docsify-copy-code using window.DocsifyCopyCodePlugin.init() is no longer necessary.")})}}},window.$docsify=window.$docsify||{},window.$docsify.plugins=[function(o,r){o.doneEach(function(){var o=Array.apply(null,document.querySelectorAll("pre[data-lang]")),c={buttonText:"复制",errorText:"×",successText:"✔"};r.config.copyCode&&Object.keys(c).forEach(function(t){var n=r.config.copyCode[t];"string"==typeof n?c[t]=n:"object"===s(n)&&Object.keys(n).some(function(o){var e=-1<location.href.indexOf(o);return c[t]=e?n[o]:c[t],e})});var e=['<button class="docsify-copy-code-button">','<span class="label">'.concat(c.buttonText,"</span>"),'<span class="error">'.concat(c.errorText,"</span>"),'<span class="success">'.concat(c.successText,"</span>"),"</button>"].join("");o.forEach(function(o){o.insertAdjacentHTML("beforeend",e)})}),o.mounted(function(){document.querySelector(".content").addEventListener("click",function(o){if(o.target.classList.contains("docsify-copy-code-button")){var e="BUTTON"===o.target.tagName?o.target:o.target.parentNode,t=document.createRange(),n=e.parentNode.querySelector("code"),c=window.getSelection();t.selectNode(n),c.removeAllRanges(),c.addRange(t);try{document.execCommand("copy")&&(e.classList.add("success"),setTimeout(function(){e.classList.remove("success")},1000))}catch(o){console.error("docsify-copy-code: ".concat(o)),e.classList.add("error"),setTimeout(function(){e.classList.remove("error")},1000)}"function"==typeof(c=window.getSelection()).removeRange?c.removeRange(t):"function"==typeof c.removeAllRanges&&c.removeAllRanges()}})})}].concat(window.$docsify.plugins||[])}(); !function(){function s(o){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o})(o)}!function(o,e){void 0===e&&(e={});var t=e.insertAt;if(o&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],c=document.createElement("style");c.type="text/css","top"===t&&n.firstChild?n.insertBefore(c,n.firstChild):n.appendChild(c),c.styleSheet?c.styleSheet.cssText=o:c.appendChild(document.createTextNode(o))}}(".docsify-copy-code-button,.docsify-copy-code-button span{cursor:pointer;transition:all .25s ease}.docsify-copy-code-button{position:absolute;z-index:1;top:1.5em;right:.5em;overflow:visible;padding:.2em .4em;border:0;border-radius:3px;outline:0;font-size:1em;background:#8d8d8d2e;color:var(--themeColor);opacity:0}.docsify-copy-code-button span{border-radius:7px;pointer-events:none}.docsify-copy-code-button .error,.docsify-copy-code-button .success{position:absolute;z-index:-100;top:50%;right:0;padding:.5em .65em;font-size:.825em;opacity:0;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.docsify-copy-code-button.error .error{right:60%;opacity:1;-webkit-transform:translate(-115%,-50%);color:red;background-color:#8d8d8d2e;transform:translate(-115%,-50%)}.docsify-copy-code-button.success .success{right:60%;opacity:1;-webkit-transform:translate(-115%,-50%);color:#00a300;background-color:#8d8d8d2e;transform:translate(-115%,-50%)}.docsify-copy-code-button:focus,pre:hover .docsify-copy-code-button{opacity:1}"),document.querySelector('link[href*="docsify-copy-code"]')&&console.warn("[Deprecation] Link to external docsify-copy-code stylesheet is no longer necessary."),window.DocsifyCopyCodePlugin={init:function(){return function(o,e){o.ready(function(){console.warn("[Deprecation] Manually initializing docsify-copy-code using window.DocsifyCopyCodePlugin.init() is no longer necessary.")})}}},window.$docsify=window.$docsify||{},window.$docsify.plugins=[function(o,r){o.doneEach(function(){var o=Array.apply(null,document.querySelectorAll("pre[data-lang]")),c={buttonText:"复制",errorText:"×",successText:"✔"};r.config.copyCode&&Object.keys(c).forEach(function(t){var n=r.config.copyCode[t];"string"==typeof n?c[t]=n:"object"===s(n)&&Object.keys(n).some(function(o){var e=-1<location.href.indexOf(o);return c[t]=e?n[o]:c[t],e})});var e=['<button class="docsify-copy-code-button">','<span class="label">'.concat(c.buttonText,"</span>"),'<span class="error">'.concat(c.errorText,"</span>"),'<span class="success">'.concat(c.successText,"</span>"),"</button>"].join("");o.forEach(function(o){o.insertAdjacentHTML("beforeend",e)})}),o.mounted(function(){document.querySelector(".content").addEventListener("click",function(o){if(o.target.classList.contains("docsify-copy-code-button")){var e="BUTTON"===o.target.tagName?o.target:o.target.parentNode,t=document.createRange(),n=e.parentNode.querySelector("code"),c=window.getSelection();t.selectNode(n),c.removeAllRanges(),c.addRange(t);try{document.execCommand("copy")&&(e.classList.add("success"),setTimeout(function(){e.classList.remove("success")},1000))}catch(o){console.error("docsify-copy-code: ".concat(o)),e.classList.add("error"),setTimeout(function(){e.classList.remove("error")},1000)}"function"==typeof(c=window.getSelection()).removeRange?c.removeRange(t):"function"==typeof c.removeAllRanges&&c.removeAllRanges()}})})}].concat(window.$docsify.plugins||[])}();
//# sourceMappingURL=docsify-copy-code.min.js.map //# sourceMappingURL=docsify-copy-code.min.js.map