30 lines
707 B
Batchfile
30 lines
707 B
Batchfile
@echo off
|
|
REM update-ssl.bat - 双击运行 SSL 证书更新脚本
|
|
REM 自动找到 Git Bash 并运行同目录下的 update-ssl.sh
|
|
|
|
cd /d "%~dp0"
|
|
|
|
REM 查找 Git Bash 的常见安装位置
|
|
set "BASH="
|
|
for %%p in (
|
|
"C:\Program Files\Git\bin\bash.exe"
|
|
"C:\Program Files (x86)\Git\bin\bash.exe"
|
|
"%LOCALAPPDATA%\Programs\Git\bin\bash.exe"
|
|
) do (
|
|
if exist %%p set "BASH=%%~p"
|
|
)
|
|
|
|
if not defined BASH (
|
|
echo 找不到 Git Bash,请先安装 Git for Windows。
|
|
echo 下载地址: https://git-scm.com/download/win
|
|
pause
|
|
exit /b 1
|
|
)
|
|
|
|
echo 正在运行 SSL 证书更新脚本...
|
|
"%BASH%" -l -c "./update-ssl.sh"
|
|
|
|
echo.
|
|
echo 脚本执行完毕,按任意键关闭窗口。
|
|
pause >nul
|