aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/justfile
diff options
context:
space:
mode:
authorLibravatar sommerfeld <sommerfeld@sommerfeld.dev>2026-04-21 01:23:56 +0100
committerLibravatar sommerfeld <sommerfeld@sommerfeld.dev>2026-04-21 01:23:56 +0100
commit8b070be38755f1af9e340dae84f1a74017efd810 (patch)
tree839a060caff24ee9a35f36620ac40bec2bdce0ad /justfile
parentc4b67e9fcc126c3e358462051b78b6a2cdec40de (diff)
downloaddotfiles-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--justfile13
1 files changed, 8 insertions, 5 deletions
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/<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