From 8b070be38755f1af9e340dae84f1a74017efd810 Mon Sep 17 00:00:00 2001 From: sommerfeld Date: Tue, 21 Apr 2026 01:23:56 +0100 Subject: feat(etc): auto-apply in etc-reset/etc-rm + add etc-untrack MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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.) --- justfile | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'justfile') diff --git a/justfile b/justfile index 0094a12..ac6771a 100644 --- a/justfile +++ b/justfile @@ -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/ to pristine pacman contents (run 'just apply' afterward) +# Reset repo-managed etc/ 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 -- cgit v1.2.3-70-g09d2