Files
OLmatter 0891d18fb6 fix(packaging): force LF for .sh/.command to fix macOS/Linux /bin/bash^M
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.
2026-06-24 21:09:07 +08:00

32 lines
829 B
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters
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.
# 强制 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