Fix deploy.sh CRLF line endings for Linux execution.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-06-12 13:37:24 +08:00
parent b38b821c35
commit 136fc51f62
3 changed files with 960 additions and 945 deletions
+13
View File
@@ -0,0 +1,13 @@
# 强制 Shell 脚本使用 LF,避免 Linux 上 $'\r': command not found
*.sh text eol=lf
deploy.sh text eol=lf
# 其他应在 Linux 服务器运行的文本文件
*.py text eol=lf
*.js text eol=lf
*.md text eol=lf
*.txt text eol=lf
*.yml text eol=lf
*.yaml text eol=lf
.gitignore text eol=lf
.gitattributes text eol=lf
+2
View File
@@ -59,6 +59,8 @@ chmod +x deploy.sh
bash deploy.sh
```
> **若报错 `$'\r': command not found`** 说明脚本含 Windows 换行符,先执行 `sed -i 's/\r$//' deploy.sh` 再重试,或 `git pull` 拉取已修复版本。
脚本自动执行以下步骤:
1. 安装系统依赖(python3、ffmpeg、libsndfile 等)
+1 -1
View File
@@ -121,7 +121,7 @@ deploy_code() {
# ---------------------------------------------------------------------------
# Python 环境
# -------------------------------------------------------------------
# ---------------------------------------------------------------------------
setup_python_venv() {
local venv_path="${INSTALL_DIR}/venv"