docs: 翻掉我上轮漏掉的三处,并修正发布说明里一条错误建议
Some checks failed
Tests / test (push) Has been cancelled

上一轮我说"剩余中文都合理",说得太满。这三处不合理:

1. bootable/linux-setup/test-installation.sh —— 在用户的 Linux 机器上跑的
   自检脚本,输出中英混杂(check "安装目录存在" ... "Directory $INSTALL_DIR")

2. issue / PR 模板 —— 贡献者第一眼看到的东西,而 CONTRIBUTING.md 已经是
   英文了。顺带修掉模板里指向上游官网和上游微信的链接(那些我们控制不了),
   改为指向本仓库。PR 模板加了一条"说明你在哪个平台跑过" —— 只在 Mac 上
   验证过的 .bat 改动一直是本项目最主要的故障来源。

3. release.yml 的发布说明正文 —— 那是用户在 release 页面读到的文字,内容
   还停留在旧产品(DeepSeek/通义、预装微信 QQ 钉钉飞书企微)。

第 3 项里还有一条**和事实相反**的建议:它让用户把 U 盘格式化成 NTFS。
macOS 对 NTFS 只读,照做正好会让"配置跟着盘走"这个核心卖点在 Mac 上
彻底失效。改为 exFAT,并说明为什么慢、以及我们如何用本机缓存补偿。

track-upstream.yml 的输入描述和输出也翻了 —— 它们会显示给手动触发
workflow 的人。
This commit is contained in:
2026-08-17 19:24:55 +08:00
parent 3221856d50
commit 45026b9d35
7 changed files with 175 additions and 149 deletions

View File

@@ -46,128 +46,128 @@ warn() {
((WARNINGS++))
}
echo "1. 检查基本目录结构..."
check "安装目录存在" "[ -d '$INSTALL_DIR' ]" "Directory $INSTALL_DIR"
check "runtime目录" "[ -d '$INSTALL_DIR/runtime' ]" "Runtime directory"
check "core目录" "[ -d '$INSTALL_DIR/core' ]" "Core directory"
check "data目录" "[ -d '$INSTALL_DIR/data' ]" "Data directory"
echo "1. Folder layout"
check "install directory" "[ -d '$INSTALL_DIR' ]" "Directory $INSTALL_DIR"
check "runtime/" "[ -d '$INSTALL_DIR/runtime' ]" "Runtime directory"
check "core/" "[ -d '$INSTALL_DIR/core' ]" "Core directory"
check "data/" "[ -d '$INSTALL_DIR/data' ]" "Data directory"
echo ""
echo "2. 检查Node.js安装..."
echo "2. Node.js"
NODE_BIN="$INSTALL_DIR/runtime/node-linux-x64/bin/node"
if [ -x "$NODE_BIN" ]; then
NODE_VERSION=$("$NODE_BIN" --version 2>/dev/null || echo "")
echo -e " Node.js版本: ${GREEN}$NODE_VERSION${NC}"
echo -e "[OK] Node.js ${GREEN}$NODE_VERSION${NC}"
if [ "$NODE_VERSION" != "v22.22.1" ]; then
warn "Node.js版本" "Expected v22.22.1, found $NODE_VERSION"
warn "Node.js version" "Expected v22.22.1, found $NODE_VERSION"
fi
else
echo -e "${RED} Node.js未找到或不可执行${NC}"
echo -e "${RED}[!!] Node.js is missing or will not run${NC}"
((ERRORS++))
fi
echo ""
echo "3. 检查OpenClaw安装..."
echo "3. OpenClaw"
if [ -d "$INSTALL_DIR/core/node_modules/openclaw" ]; then
echo -e " OpenClaw已安装"
echo -e "[OK] OpenClaw is installed"
# 检查主要文件
OPENCLAW_ENTRY=$(find "$INSTALL_DIR/core/node_modules/openclaw" -name "openclaw.mjs" -maxdepth 2 2>/dev/null | head -1)
if [ -n "$OPENCLAW_ENTRY" ]; then
echo -e "✓ OpenClaw入口文件: ${GREEN}$OPENCLAW_ENTRY${NC}"
echo -e "[OK] entry point: ${GREEN}$OPENCLAW_ENTRY${NC}"
else
echo -e "${RED}✗ 未找到openclaw.mjs${NC}"
echo -e "${RED}[!!] openclaw.mjs not found${NC}"
((ERRORS++))
fi
else
echo -e "${RED} OpenClaw未安装${NC}"
echo -e "${RED}[!!] OpenClaw is not installed${NC}"
((ERRORS++))
fi
echo ""
echo "4. 检查配置文件..."
echo "4. Configuration"
CONFIG_FILE="$INSTALL_DIR/data/.openclaw/openclaw.json"
if [ -f "$CONFIG_FILE" ]; then
echo -e "✓ 配置文件存在"
echo -e "[OK] config file present"
# 检查配置格式
if python3 -m json.tool "$CONFIG_FILE" >/dev/null 2>&1; then
echo -e "✓ 配置文件格式正确"
echo -e "[OK] config parses"
else
warn "配置文件" "JSON格式可能有问题"
warn "config file" "may not be valid JSON"
fi
else
echo -e "${YELLOW}⚠ 配置文件不存在(首次运行正常)${NC}"
echo -e "${YELLOW}[ ?] no config file yet — normal before the first run${NC}"
((WARNINGS++))
fi
echo ""
echo "5. 检查启动脚本..."
echo "5. Launcher"
START_SCRIPT="$INSTALL_DIR/start-openclaw.sh"
if [ -x "$START_SCRIPT" ]; then
echo -e "✓ 启动脚本存在且可执行"
echo -e "[OK] start script present and executable"
else
if [ -f "$START_SCRIPT" ]; then
echo -e "${YELLOW}⚠ 启动脚本存在但不可执行${NC}"
chmod +x "$START_SCRIPT" 2>/dev/null && echo " 已添加执行权限"
echo -e "${YELLOW}[ ?] start script is present but not executable${NC}"
chmod +x "$START_SCRIPT" 2>/dev/null && echo " added the executable bit"
else
echo -e "${RED}✗ 启动脚本未找到${NC}"
echo -e "${RED}[!!] start script not found${NC}"
((ERRORS++))
fi
fi
echo ""
echo "6. 检查端口可用性..."
echo "6. Ports"
PORT_FOUND=false
for port in $(seq 18789 18799); do
if ! ss -tlnp 2>/dev/null | grep -q ":$port "; then
echo -e "✓ 端口 $port 可用"
echo -e "[OK] port $port is free"
PORT_FOUND=true
break
fi
done
if [ "$PORT_FOUND" = false ]; then
warn "端口" "所有端口18789-18799都被占用"
warn "ports" "18789-18799 are all in use — U-Claw may already be running"
fi
echo ""
echo "7. 检查桌面快捷方式..."
echo "7. Desktop shortcut"
if [ -f "$HOME/Desktop/openclaw.desktop" ] || [ -f "$HOME/.local/share/applications/openclaw.desktop" ]; then
echo -e "✓ 桌面快捷方式已创建"
echo -e "[OK] shortcut created"
else
warn "桌面快捷方式" "未找到桌面快捷方式"
warn "desktop shortcut" "not found"
fi
echo ""
echo "============================================"
echo " 测试结果汇总"
echo " Results"
echo "============================================"
echo ""
if [ $ERRORS -eq 0 ]; then
echo -e "${GREEN}✅ 所有关键检查通过!${NC}"
echo " 安装看起来是成功的。"
echo -e "${GREEN}[OK] Everything essential checks out.${NC}"
echo " The install looks good."
echo ""
echo " 启动命令:"
echo " Start it with:"
echo " bash /opt/u-claw/start-openclaw.sh"
echo ""
echo " 或双击桌面上的 'U-Claw AI Assistant' 图标"
echo " Or double-click the U-Claw AI Assistant icon on the desktop."
else
echo -e "${RED}❌ 发现 $ERRORS 个错误${NC}"
echo " 请检查上述失败的项目。"
echo -e "${RED}[!!] $ERRORS problem(s) found${NC}"
echo " Look at the failed checks above."
echo ""
echo " 常见解决方案:"
echo " 1. 重新运行安装脚本:"
echo " Usually one of these:"
echo " 1. Run the install script again:"
echo " sudo bash /opt/u-claw/setup-openclaw.sh"
echo " 2. 检查网络连接"
echo " 3. 查看详细日志"
echo " 2. Check the network"
echo " 3. Read the log"
fi
if [ $WARNINGS -gt 0 ]; then
echo -e "${YELLOW}⚠ 有 $WARNINGS 个警告${NC}"
echo " 这些可能不会影响基本功能,但建议修复。"
echo -e "${YELLOW}[ ?] $WARNINGS warning(s)${NC}"
echo " These probably will not stop it working, but are worth fixing."
fi
echo ""
@@ -176,25 +176,25 @@ echo "============================================"
# 提供快速修复选项
if [ $ERRORS -gt 0 ]; then
echo ""
read -rp "是否尝试自动修复问题? (y/N): " FIX
read -rp "Try to fix these automatically? (y/N): " FIX
if [[ "$FIX" =~ ^[Yy]$ ]]; then
echo ""
echo "尝试修复..."
echo "Fixing…"
# 修复启动脚本权限
if [ -f "$START_SCRIPT" ] && [ ! -x "$START_SCRIPT" ]; then
echo " 修复启动脚本权限..."
echo " Restoring the start script permissions"
sudo chmod +x "$START_SCRIPT"
fi
# 重新安装OpenClaw
if [ ! -d "$INSTALL_DIR/core/node_modules/openclaw" ]; then
echo " 重新安装OpenClaw..."
echo " Reinstalling OpenClaw"
cd "$INSTALL_DIR/core"
sudo npm install --registry=https://registry.npmjs.org openclaw@latest 2>/dev/null || true
fi
echo ""
echo "修复完成。请重新运行此测试脚本。"
echo "Done. Run this check again to confirm."
fi
fi