Docker Cleanup Preview
Show reclaimable Docker space, then prune only with an explicit flag.
$ webtoolist --script git-repo-status-all
Report branch, dirty state, and ahead/behind for every Git repo under a directory.
gitrepositoriesstatusdevopsDependencies: git, find
#!/usr/bin/env bash
set -euo pipefail
root="${1:-.}"
depth="${DEPTH:-3}"
find "$root" -maxdepth "$depth" -type d -name .git -print 2>/dev/null \
| while IFS= read -r gitdir; do
repo="$(dirname "$gitdir")"
branch="$(git -C "$repo" branch --show-current 2>/dev/null || echo detached)"
dirty="$(git -C "$repo" status --porcelain 2>/dev/null | wc -l)"
ahead="$(git -C "$repo" rev-list --count '@{u}..HEAD' 2>/dev/null || echo 0)"
behind="$(git -C "$repo" rev-list --count 'HEAD..@{u}' 2>/dev/null || echo 0)"
printf '%-40s %-20s dirty=%-3s ahead=%-3s behind=%-3s\n' \
"$repo" "$branch" "$dirty" "$ahead" "$behind"
done
./git-repo-status-all ~/Projects
DEPTH=5 ./git-repo-status-all /srv
git -C PATH fetch first if you care about comparisons with the remote.Related scripts
Show reclaimable Docker space, then prune only with an explicit flag.
Print active/inactive state for a list of systemd services.
Deploy a release directory and switch a symlink, keeping the previous release for rollback.