From b4cd0ebe7ae61add21cd32bf2392da00fef12241 Mon Sep 17 00:00:00 2001 From: hygienic-books Date: Fri, 17 Mar 2023 01:18:24 +0100 Subject: [PATCH] fix(sync): chown symlinks, not their dereferenced target --- sync-dot-files.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sync-dot-files.sh b/sync-dot-files.sh index 7063e34..6c4dbe1 100755 --- a/sync-dot-files.sh +++ b/sync-dot-files.sh @@ -70,7 +70,7 @@ if we_are_ahead || [[ "${do_force}" == 'true' ]]; then if [[ "${do_force}" == 'true' ]]; then sudo --preserve-env=SSH_AUTH_SOCK su --shell /bin/bash --command 'cd; sudo --preserve-env=SSH_AUTH_SOCK git reset --hard' "${account}" fi - sudo --preserve-env=SSH_AUTH_SOCK su --shell /bin/bash --command 'cd; sudo --preserve-env=SSH_AUTH_SOCK git pull; sudo find '"'"'.'"'"' \( -not -user '"${account}"' -or -not -group '"${account}"' \) -print0 | sudo xargs --no-run-if-empty --null -I '"'"'{}'"'"' chown --verbose '"${account}"':'"${account}"' '"'"'{}'"'"'' "${account}" + sudo --preserve-env=SSH_AUTH_SOCK su --shell /bin/bash --command 'cd; sudo --preserve-env=SSH_AUTH_SOCK git pull; sudo find '"'"'.'"'"' \( -not -user '"${account}"' -or -not -group '"${account}"' \) -print0 | sudo xargs --no-run-if-empty --null -I '"'"'{}'"'"' chown --verbose --no-dereference '"${account}"':'"${account}"' '"'"'{}'"'"'' "${account}" done else pprint 'Nothing to do'