feat: add script catalog and -h help for all dotfile scripts

Introduce ff script -h with auto descriptions, shared help.sh, and usage flags across script/*.sh.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-25 15:09:35 +08:00
parent 1f6b042b26
commit 67291a9a50
36 changed files with 1056 additions and 442 deletions
+23
View File
@@ -1,2 +1,25 @@
#!/bin/bash
# 清理 Docker 未使用的镜像、容器与缓存(docker system prune -a)
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# shellcheck disable=SC1091
source "$SCRIPT_DIR/common/help.sh"
usage() {
cat <<'EOF'
用法: docker-clean
执行 docker system prune -a,删除未使用的镜像、容器、网络等。
选项:
-h, --help 显示此帮助
警告: 会删除未使用的镜像,请确认无重要 dangling 资源。
EOF
}
dotfile_help_requested "${1:-}" && dotfile_show_help
set -euo pipefail
docker system prune -a