From f1be7b1a74bf21db40a08f82bdbb9bee1d16f955 Mon Sep 17 00:00:00 2001 From: sommerfeld Date: Tue, 21 Apr 2026 01:23:19 +0100 Subject: fix: use cp --remove-destination in etc deploy script Old stow symlinks in /etc/ point back to the repo, making source and dest the same file. --remove-destination removes the symlink first. --- run_onchange_after_deploy-etc.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'run_onchange_after_deploy-etc.sh') diff --git a/run_onchange_after_deploy-etc.sh b/run_onchange_after_deploy-etc.sh index d23eebe..e016fa1 100755 --- a/run_onchange_after_deploy-etc.sh +++ b/run_onchange_after_deploy-etc.sh @@ -13,7 +13,7 @@ for f in \ systemd/system.conf.d/timeout.conf do doas mkdir -p "/etc/$(dirname "$f")" - doas cp "$CHEZMOI_SOURCE_DIR/etc/$f" "/etc/$f" + doas cp --remove-destination "$CHEZMOI_SOURCE_DIR/etc/$f" "/etc/$f" done # etc2/ — must be real files (e.g. reflector refuses symlinks) @@ -21,5 +21,5 @@ for f in \ xdg/reflector/reflector.conf do doas mkdir -p "/etc/$(dirname "$f")" - doas cp "$CHEZMOI_SOURCE_DIR/etc2/$f" "/etc/$f" + doas cp --remove-destination "$CHEZMOI_SOURCE_DIR/etc2/$f" "/etc/$f" done -- cgit v1.2.3-70-g09d2