Remove claw push and payloads directory with related docs

This commit is contained in:
2026-05-16 21:52:19 +08:00
parent 24d32cc34b
commit bd482b3301
5 changed files with 84 additions and 49 deletions
+39
View File
@@ -0,0 +1,39 @@
#!/usr/bin/env bash
# ============================================================
# git-repo-create@tx-ubuntu-git.sh
# 在 git 用户下创建裸仓库(bare repo),作为本地 git push 的目标
#
# 用法: claw run tx-ubuntu-git git-repo-create@tx-ubuntu-git.sh
# 适用: Ubuntu 24.04
#
# 前置条件:
# - git 用户已创建,SSH 密钥已配置
# - /home/git/repos 目录可写
#
# 路径约定:
# - 裸仓库: /home/git/repos/<项目名>.git
# - 通过 SSH git@62.234.90.54 访问
#
# 如需新增其他项目,复制此脚本,修改 REPO 变量即可
# ============================================================
set -e
# ---- 配置(新增项目改这里) ----
BASEDIR="/home/git/repos" # 裸仓库根目录
REPO="Work" # 项目名
# -------------------------------
REPO_PATH="$BASEDIR/$REPO.git"
if [ -d "$REPO_PATH" ]; then
echo "仓库已存在: $REPO_PATH"
else
mkdir -p "$BASEDIR"
git init --bare "$REPO_PATH"
echo "仓库创建完成: $REPO_PATH"
fi
echo ""
echo "=== 本地使用 ==="
echo " git remote add tx ssh://git@62.234.90.54$REPO_PATH"
echo " git push -u tx main"
+16 -1
View File
@@ -1,5 +1,20 @@
#!/usr/bin/env bash
# sync-blog: pull + rebuild
# ============================================================
# sync-blog@tx-ubuntu-hugo.sh
# 拉取 Hugo 博客最新代码并重新构建静态页面
#
# 用法: claw run tx-ubuntu-hugo sync-blog@tx-ubuntu-hugo.sh
# 适用: Ubuntu 24.04, Hugo 0.161+
#
# 前置条件:
# - ~/hugo-blog 已 git clone 且 remote 指向 github.com:fukunee/Hugo
# - hugo 已安装
# - nginx 指向 ~/hugo-blog/public
#
# 流程:
# 1. git pull — 拉取最新文章和配置
# 2. hugo build — 重建静态页面到 public/
# ============================================================
set -e
cd ~/hugo-blog
+12 -1
View File
@@ -1,13 +1,24 @@
#!/usr/bin/env bash
# 示例脚本 - 查看主机基本信息
# ============================================================
# sysinfo@tx-ubuntu-ubuntu.sh
# 主机健康速览:系统信息、磁盘、内存
#
# 用法: claw run tx-ubuntu-ubuntu sysinfo@tx-ubuntu-ubuntu.sh
# 适用: Ubuntu 24.04
# ============================================================
set -e
echo "===== 主机信息 ====="
echo "主机名: $(hostname)"
echo "系统: $(cat /etc/os-release | grep PRETTY_NAME | cut -d= -f2 | tr -d '"')"
echo "内核: $(uname -r)"
echo "运行时间: $(uptime -p)"
echo ""
echo "===== 磁盘 ====="
# 仅显示根分区,如需全部分区改成 df -h
df -h /
echo ""
echo "===== 内存 ====="
free -h