1
0
mirror of https://github.com/DSPBluePrints/FactoryBluePrints.git synced 2026-03-22 09:33:22 +08:00
Files
FactoryBluePrints/切换镜像.bat
Soar Qin b64c748cce 新的一键更新脚本
* 无需下载仓库即可完成全流程:
  * 下载MinGit
  * 设置镜像并克隆仓库
  * 更新仓库
* 可手动切换镜像
2026-03-03 17:24:23 +08:00

44 lines
795 B
Batchfile
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
@echo off
chcp 65001 >NUL
SETLOCAL enableextensions enabledelayedexpansion
REM 本地目录,如果当前目录有.git文件夹的存在则不使用此目录
SET LocalFolder=FactoryBluePrints
REM 设置MinGit
CALL "一键更新仓库.bat" SETUP_MINGIT
IF %errorlevel% NEQ 0 (
GOTO END
)
IF EXIST "%CD%\%LocalFolder%\.git" GOTO SET_MIRROR
IF EXIST "%CD%\.git" (
SET LocalFolder=.
GOTO SET_MIRROR
)
FOR /F "tokens=* USEBACKQ" %%F IN (`ECHO %CD%`) DO (
IF "%%~nF"=="%LocalFolder%" (
SET LocalFolder=.
)
)
ECHO -- 未检测到已下载的蓝图仓库。
GOTO END
:SET_MIRROR
PUSHD %LocalFolder% 1>NUL 2>NUL
REM 设置镜像
CALL "%~dp0一键更新仓库.bat" SETUP_MIRROR
POPD 1>NUL 2>NUL
:END
ENDLOCAL
ECHO  按任意键关闭此窗口...
PAUSE >NUL