|
|
5 ay önce | |
|---|---|---|
| README.md | 5 ay önce | |
| setup-gentool.sh | 5 ay önce | |
| setup-mysql-cli.sh | 5 ay önce | |
| setup-ssh.sh | 5 ay önce | |
| setup-trunk.sh | 5 ay önce | |
| tool-import-sql.sh | 5 ay önce | |
| tool-merge-sql.sh | 5 ay önce | |
| tool-trunk-checker.sh | 5 ay önce |
通用脚本集合
#!/bin/bash
# 先克隆 shell-kit 仓库(如果不存在)
if [ ! -d "/workspace/shell-kit" ]; then
echo "正在克隆 shell-kit 仓库..."
if git clone https://github.com/Kit/shell-kit.git /workspace/shell-kit; then
echo "shell-kit 仓库克隆完成"
else
echo "错误:shell-kit 仓库克隆失败"
exit 1
fi
else
echo "shell-kit 仓库已存在,跳过克隆"
fi
# 配置SSH服务
if [ -f "/workspace/shell-kit/setup-ssh.sh" ]; then
echo "正在配置SSH服务..."
chmod +x /workspace/shell-kit/setup-ssh.sh
/workspace/shell-kit/setup-ssh.sh
else
echo "警告:SSH配置脚本不存在,跳过SSH配置"
fi
# 安装 trunk 工具并初始化
if [ -f "/workspace/shell-kit/setup-trunk.sh" ]; then
echo "正在安装 trunk 工具并初始化..."
chmod +x /workspace/shell-kit/setup-trunk.sh
/workspace/shell-kit/setup-trunk.sh
else
echo "警告:trunk 安装脚本不存在,跳过 trunk 安装和初始化"
fi
# 安装 gentool 工具
if [ -f "/workspace/shell-kit/setup-gentool.sh" ]; then
echo "正在安装 gentool 工具..."
chmod +x /workspace/shell-kit/setup-gentool.sh
/workspace/shell-kit/setup-gentool.sh
else
echo "警告:gentool 安装脚本不存在,跳过 gentool 安装"
fi
# 安装 MySQL CLI 工具
if [ -f "/workspace/shell-kit/setup-mysql-cli.sh" ]; then
echo "正在安装 MySQL CLI 工具..."
chmod +x /workspace/shell-kit/setup-mysql-cli.sh
/workspace/shell-kit/setup-mysql-cli.sh
else
echo "警告:MySQL CLI 安装脚本不存在,跳过 MySQL CLI 安装"
fi