| 1234567891011121314151617181920212223242526272829303132333435 |
- #!/bin/bash
- # 先克隆 shell-kit 仓库(如果不存在)
- echo ""
- if [ ! -d "/workspace/shell-kit" ]; then
- if git clone root@git.ooo.ink:root/shell-kit.git /workspace/shell-kit; then
- echo "✅ shell-kit 仓库克隆完成"
- else
- echo "❌ shell-kit 仓库克隆失败"
- exit 1
- fi
- else
- echo "✅ shell-kit 仓库已存在,跳过克隆"
- fi
- echo ""
- # 配置 SSH 服务
- echo ""
- if [ -f "/workspace/shell-kit/setup-ssh.sh" ]; then
- chmod +x /workspace/shell-kit/setup-ssh.sh
- /workspace/shell-kit/setup-ssh.sh
- else
- echo "⚠️ 警告:SSH 配置脚本不存在,跳过 SSH 配置"
- fi
- echo ""
- # 安装 trunk 工具并初始化
- echo ""
- if [ -f "/workspace/shell-kit/setup-trunk.sh" ]; then
- chmod +x /workspace/shell-kit/setup-trunk.sh
- /workspace/shell-kit/setup-trunk.sh
- else
- echo "⚠️ 警告:trunk 安装脚本不存在,跳过 trunk 安装和初始化"
- fi
- echo ""
|