diff options
| author | 2026-04-21 01:23:20 +0100 | |
|---|---|---|
| committer | 2026-04-21 01:23:20 +0100 | |
| commit | cb0e8d0ddf6cf11a103eb35a72b7e7049b87d379 (patch) | |
| tree | dbe36c2a53e7b722973e772d79d052531f8fb5e6 /justfile | |
| parent | 7e3e04b8f0a61a8a20928202c102c9dab0d1824a (diff) | |
| download | dotfiles-cb0e8d0ddf6cf11a103eb35a72b7e7049b87d379.tar.gz dotfiles-cb0e8d0ddf6cf11a103eb35a72b7e7049b87d379.tar.bz2 dotfiles-cb0e8d0ddf6cf11a103eb35a72b7e7049b87d379.zip | |
feat: add 'just groups' recipe to show per-group install coverage
Shows install status for each meta group:
✓ (green) fully installed
~ (yellow) partially installed
✗ (red) nothing installed
Diffstat (limited to 'justfile')
| -rw-r--r-- | justfile | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -49,3 +49,23 @@ status: echo "" echo "=== Dotfile drift ===" chezmoi status || true + +# Show install coverage for each group +groups: + #!/bin/sh + for file in meta/*.txt; do + group=$(basename "$file" .txt) + pkgs=$(grep -v '^\s*#' "$file" | grep -v '^\s*$') + total=$(echo "$pkgs" | wc -l) + installed=0 + for pkg in $pkgs; do + pacman -Qi "$pkg" >/dev/null 2>&1 && installed=$((installed + 1)) + done + if [ "$installed" -eq "$total" ]; then + printf ' \033[32m✓\033[0m %-10s %d/%d\n' "$group" "$installed" "$total" + elif [ "$installed" -eq 0 ]; then + printf ' \033[31m✗\033[0m %-10s %d/%d\n' "$group" "$installed" "$total" + else + printf ' \033[33m~\033[0m %-10s %d/%d\n' "$group" "$installed" "$total" + fi + done |
