diff options
| author | 2026-04-21 01:23:56 +0100 | |
|---|---|---|
| committer | 2026-04-21 01:23:56 +0100 | |
| commit | 8b070be38755f1af9e340dae84f1a74017efd810 (patch) | |
| tree | 839a060caff24ee9a35f36620ac40bec2bdce0ad /justfile | |
| parent | c4b67e9fcc126c3e358462051b78b6a2cdec40de (diff) | |
| download | dotfiles-8b070be38755f1af9e340dae84f1a74017efd810.tar.gz dotfiles-8b070be38755f1af9e340dae84f1a74017efd810.tar.bz2 dotfiles-8b070be38755f1af9e340dae84f1a74017efd810.zip | |
feat(etc): auto-apply in etc-reset/etc-rm + add etc-untrack
- etc-reset and etc-rm now chain 'just apply' at the end, so a
single invocation leaves both repo and /etc consistent.
- New etc-untrack recipe = etc-reset + etc-rm. One command to
cleanly stop tracking an owned /etc file:
before: just etc-reset X && just apply && just etc-rm X && just apply
after : just etc-untrack X
(etc-untrack doesn't apply to unowned files — use etc-rm.)
Diffstat (limited to 'justfile')
| -rw-r--r-- | justfile | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -354,10 +354,9 @@ etc-rm +paths: done echo "removed: $repo (/etc/$p left untouched)" done - echo - echo "Run 'just apply' to refresh the deploy-etc hash." + just apply -# Reset repo-managed etc/<path> to pristine pacman contents (run 'just apply' afterward) +# Reset repo-managed etc/<path> to pristine pacman contents and deploy etc-reset +paths: #!/usr/bin/env bash set -eo pipefail @@ -392,8 +391,12 @@ etc-reset +paths: bsdtar -xOf "$cache" "${live#/}" > "$repo" echo "reset (from $pkg): $repo" done - echo - echo "Run 'just apply' to deploy the pristine copy to /etc." + just apply + +# Stop tracking one or more /etc files: reset to pristine, deploy, then drop from repo +etc-untrack +paths: + just etc-reset {{ paths }} + just etc-rm {{ paths }} # ═══════════════════════════════════════════════════════════════════ # Package management |
