mirror of
https://github.com/OLmatter/glm-coding-helper.git
synced 2026-10-07 14:58:39 +08:00
Root cause (per Dixon): repo had no .gitattributes, so on Windows git checkout converted shell scripts to CRLF; release zips built on Windows then carried CRLF -> macOS/Linux users hit /bin/bash^M: bad interpreter. Fix (two layers): - Add .gitattributes: *.sh/*.command = eol=lf (force LF on checkout/commit), *.ps1/*.cmd = eol=crlf (PS/cmd friendly), JS/py/md = lf, binaries = binary. - build_release_zips.ps1 / build_portable.ps1: when writing .sh/.command into the zip, replace CRLF with LF (defense-in-depth even if autocrlf slipped). Also normalize scripts/setup_backend_macos.sh (was CRLF in working tree). Verified: new zips have ALL .sh/.command as LF.
32 lines
829 B
Plaintext
32 lines
829 B
Plaintext
# 强制 shell 脚本为 LF 行尾,避免在 Windows 上被打成 CRLF
|
||
# 导致 macOS/Linux 执行时 /bin/bash^M 错误
|
||
*.sh text eol=lf
|
||
*.command text eol=lf
|
||
|
||
# Windows 脚本保持 CRLF(PowerShell/cmd 对 CRLF 更友好)
|
||
*.ps1 text eol=crlf
|
||
*.cmd text eol=crlf
|
||
|
||
# 油猴脚本/JS/Python/文档用 LF
|
||
*.js text eol=lf
|
||
*.py text eol=lf
|
||
*.md text eol=lf
|
||
*.html text eol=lf
|
||
*.json text eol=lf
|
||
*.txt text eol=lf
|
||
*.yaml text eol=lf
|
||
*.yml text eol=lf
|
||
*.toml text eol=lf
|
||
*.ini text eol=lf
|
||
|
||
# 二进制文件
|
||
*.png binary
|
||
*.jpg binary
|
||
*.jpeg binary
|
||
*.gif binary
|
||
*.zip binary
|
||
*.pt binary
|
||
*.safetensors binary
|
||
*.onnx binary
|
||
*.ico binary
|