fix(sync): chown symlinks, not their dereferenced target

This commit is contained in:
hygienic-books 2023-03-17 01:18:24 +01:00
parent 4bfbb54a54
commit b4cd0ebe7a

View File

@ -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'