Fix deploy.sh CRLF line endings for Linux execution.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -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
|
||||||
@@ -59,6 +59,8 @@ chmod +x deploy.sh
|
|||||||
bash deploy.sh
|
bash deploy.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
|
> **若报错 `$'\r': command not found`:** 说明脚本含 Windows 换行符,先执行 `sed -i 's/\r$//' deploy.sh` 再重试,或 `git pull` 拉取已修复版本。
|
||||||
|
|
||||||
脚本自动执行以下步骤:
|
脚本自动执行以下步骤:
|
||||||
|
|
||||||
1. 安装系统依赖(python3、ffmpeg、libsndfile 等)
|
1. 安装系统依赖(python3、ffmpeg、libsndfile 等)
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ deploy_code() {
|
|||||||
|
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
# Python 环境
|
# Python 环境
|
||||||
# -------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
setup_python_venv() {
|
setup_python_venv() {
|
||||||
local venv_path="${INSTALL_DIR}/venv"
|
local venv_path="${INSTALL_DIR}/venv"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user