diff options
| author | 2026-04-21 01:23:19 +0100 | |
|---|---|---|
| committer | 2026-04-21 01:23:19 +0100 | |
| commit | f1be7b1a74bf21db40a08f82bdbb9bee1d16f955 (patch) | |
| tree | 54d8ceb68a14d684dc8b6dc07ff5cf97183f5e13 | |
| parent | 928ec33857f0ed83c9d89ee05fa5c26773323473 (diff) | |
| download | dotfiles-f1be7b1a74bf21db40a08f82bdbb9bee1d16f955.tar.gz dotfiles-f1be7b1a74bf21db40a08f82bdbb9bee1d16f955.tar.bz2 dotfiles-f1be7b1a74bf21db40a08f82bdbb9bee1d16f955.zip | |
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.
| -rwxr-xr-x | run_onchange_after_deploy-etc.sh | 4 |
1 files changed, 2 insertions, 2 deletions
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 |
