aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--.github/copilot-instructions.md2
-rw-r--r--justfile15
2 files changed, 16 insertions, 1 deletions
diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md
index 4d7aad6..b4cab5d 100644
--- a/.github/copilot-instructions.md
+++ b/.github/copilot-instructions.md
@@ -19,7 +19,7 @@ The repo root is a chezmoi source directory. Files targeting `$HOME` use chezmoi
- `create-efi.sh` is an interactive EFI boot entry creation script using `efibootmgr`.
- `.chezmoiignore` excludes non-home files (`etc/`, `meta/`, `firefox/`, docs) from deployment to `$HOME`.
- `.githooks/` contains git hooks (notably `post-commit` which runs `chezmoi apply`). Activate with `just install-hooks`.
-- `justfile` provides recipes: `install-hooks`, `apply`, `install`, `install-all`, `add`, `status`, `groups`.
+- `justfile` provides recipes: `install-hooks`, `apply`, `install`, `install-all`, `add`, `status`, `groups`, `fix`.
## Window manager
diff --git a/justfile b/justfile
index ebb883b..6d67849 100644
--- a/justfile
+++ b/justfile
@@ -18,6 +18,21 @@ install-all:
#!/bin/sh
cat meta/*.txt | grep -v '^\s*#' | grep -v '^\s*$' | sort -u | paru -S --needed -
+# Fill in missing packages for groups that are already partially/fully installed
+fix:
+ #!/bin/sh
+ for file in meta/*.txt; do
+ group=$(basename "$file" .txt)
+ pkgs=$(grep -v '^\s*#' "$file" | grep -v '^\s*$')
+ for pkg in $pkgs; do
+ if pacman -Qi "$pkg" >/dev/null 2>&1; then
+ echo ">>> topping up $group"
+ echo "$pkgs" | paru -S --needed -
+ break
+ fi
+ done
+ done
+
# Add a package to a group and install it (e.g. just add dev ripgrep)
add group pkg:
#!/bin/sh