feat: add windows double-click launcher and update readme
This commit is contained in:
@@ -1,2 +1,5 @@
|
||||
# Ensure shell scripts always use LF line endings, even on Windows/Git Bash.
|
||||
*.sh text eol=lf
|
||||
|
||||
# Batch files must use CRLF line endings to run correctly on Windows.
|
||||
*.bat text eol=crlf
|
||||
|
||||
@@ -10,6 +10,14 @@
|
||||
|
||||
## 使用方法
|
||||
|
||||
### 方式一:Windows 双击运行(推荐)
|
||||
|
||||
1. 在 Windows 上同步仓库(`git pull`)。
|
||||
2. 双击 `update-ssl.bat`。
|
||||
3. 脚本会自动打开 Git Bash 并运行,完成后按任意键关闭窗口。
|
||||
|
||||
### 方式二:终端运行(Mac / Linux)
|
||||
|
||||
在终端里运行:
|
||||
|
||||
```bash
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
@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
|
||||
Reference in New Issue
Block a user