From c2aaa967c14bcc455dde81a0a8f506acacf8c932 Mon Sep 17 00:00:00 2001 From: bin456789 Date: Fri, 5 Apr 2024 19:23:55 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=94=B9=E4=BB=A3=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- reinstall.bat | 6 +++--- reinstall.sh | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/reinstall.bat b/reinstall.bat index f18cf26..9fd2130 100644 --- a/reinstall.bat +++ b/reinstall.bat @@ -3,7 +3,7 @@ mode con cp select=437 >nul setlocal EnableDelayedExpansion set confhome=https://raw.githubusercontent.com/bin456789/reinstall/main -set github_proxy=raw.gitmirror.com +set github_proxy=https://mirror.ghproxy.com/https://raw.githubusercontent.com rem 65001 代码页会乱码 @@ -43,8 +43,8 @@ if not errorlevel 1 ( if defined github_proxy ( echo !confhome! | findstr /c:"://raw.githubusercontent.com/" >nul if not errorlevel 1 ( - rem set confhome=!github_proxy!/!confhome! - set confhome=!confhome:raw.githubusercontent.com=%github_proxy%! + set confhome=!confhome:http://=https://! + set confhome=!confhome:https://raw.githubusercontent.com=%github_proxy%! ) ) ) else ( diff --git a/reinstall.sh b/reinstall.sh index 5fba44c..5b142c3 100644 --- a/reinstall.sh +++ b/reinstall.sh @@ -3,7 +3,7 @@ set -eE confhome=https://raw.githubusercontent.com/bin456789/reinstall/main -github_proxy=raw.gitmirror.com +github_proxy=https://mirror.ghproxy.com/https://raw.githubusercontent.com # https://www.gnu.org/software/gettext/manual/html_node/The-LANGUAGE-variable.html export LC_ALL=C @@ -2089,8 +2089,8 @@ esac # jsdelivr 有12小时缓存 # https://github.com/XIU2/UserScript/blob/master/GithubEnhanced-High-Speed-Download.user.js#L31 if [ -n "$github_proxy" ] && [[ "$confhome" = http*://raw.githubusercontent.com/* ]] && is_in_china; then - # confhome=$github_proxy/$confhome - confhome=${confhome/raw.githubusercontent.com/$github_proxy} + confhome=${confhome/http:\/\//https:\/\/} + confhome=${confhome/https:\/\/raw.githubusercontent.com/$github_proxy} fi # 以下目标系统不需要两步安装