This commit is contained in:
Leo
2025-12-14 14:32:34 +08:00
parent f08fc60857
commit 8bd5ffc53d
3 changed files with 281 additions and 7 deletions

15
fix_line_endings.sh Normal file
View File

@@ -0,0 +1,15 @@
#!/bin/bash
# 修复 setup_centos.sh 的行尾符问题
# 方法1: 使用 dos2unix (如果已安装)
if command -v dos2unix >/dev/null 2>&1; then
dos2unix setup_centos.sh
echo "✅ 已使用 dos2unix 修复行尾符"
# 方法2: 使用 sed 删除 \r 字符
else
sed -i 's/\r$//' setup_centos.sh
echo "✅ 已使用 sed 修复行尾符"
fi
chmod +x setup_centos.sh
echo "✅ 已设置执行权限"