reinstall.bat 使用 http 代替 https
This commit is contained in:
parent
dddb8eb49a
commit
a2eb0b6ec6
@ -34,10 +34,13 @@ reboot
|
||||
```
|
||||
#### 使用(当前系统是 Windows):
|
||||
```
|
||||
下载 https://raw.githubusercontent.com/bin456789/reinstall/main/reinstall.bat
|
||||
下载
|
||||
https://raw.githubusercontent.com/bin456789/reinstall/main/reinstall.bat
|
||||
https://raw.githubusercontent.com/bin456789/reinstall/main/reinstall.sh
|
||||
放到同一目录
|
||||
|
||||
管理员权限打开 cmd/powershell
|
||||
reinstall.bat centos-7 (或其他系统)
|
||||
管理员权限打开 cmd/powershell 窗口
|
||||
运行 reinstall.bat centos-7 (或其他系统)
|
||||
|
||||
本脚本所有功能皆可在 Windows 下使用,包括重装到 Linux/Windows/dd
|
||||
```
|
||||
|
@ -2,6 +2,10 @@
|
||||
set confhome=https://raw.githubusercontent.com/bin456789/reinstall/main
|
||||
setlocal EnableDelayedExpansion
|
||||
|
||||
:: Windows 7 SP1 winhttp 默认不支持 tls 1.2
|
||||
:: https://support.microsoft.com/en-us/topic/update-to-enable-tls-1-1-and-tls-1-2-as-default-secure-protocols-in-winhttp-in-windows-c4bd73d2-31d7-761e-0178-11268bb10392
|
||||
:: 有些系统根证书没更新
|
||||
:: 所以不要用https
|
||||
:: 进入脚本目录
|
||||
cd /d %~dp0
|
||||
|
||||
@ -18,12 +22,12 @@ set tags=%tmp%\cygwin-installed-!pkgs!
|
||||
if not exist !tags! (
|
||||
:: 检查是否国内
|
||||
:: 在括号里面,:: 下一行不能是空行!!!!!
|
||||
call :download https://geoip.fedoraproject.org/city %tmp%\geoip "Check Location"
|
||||
call :download http://geoip.fedoraproject.org/city %tmp%\geoip "Check Location"
|
||||
findstr CHN %tmp%\geoip >nul
|
||||
if !errorlevel! == 0 (
|
||||
set host=https://mirrors.tuna.tsinghua.edu.cn
|
||||
set host=http://mirror.nju.edu.cn
|
||||
) else (
|
||||
set host=https://mirrors.kernel.org
|
||||
set host=http://mirrors.kernel.org
|
||||
)
|
||||
|
||||
:: 检查32/64位
|
||||
@ -37,7 +41,7 @@ if not exist !tags! (
|
||||
)
|
||||
|
||||
:: 下载 Cygwin
|
||||
call :download https://www.cygwin.com/setup-!arch!.exe %tmp%\setup-cygwin.exe "Download Cygwin"
|
||||
call :download http://www.cygwin.com/setup-!arch!.exe %tmp%\setup-cygwin.exe "Download Cygwin"
|
||||
|
||||
:: 安装 Cygwin
|
||||
set site=!host!!dir!
|
||||
|
Loading…
Reference in New Issue
Block a user