fix(sync): chown symlinks, not their dereferenced target
This commit is contained in:
parent
4bfbb54a54
commit
b4cd0ebe7a
@ -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'
|
||||
|
Loading…
x
Reference in New Issue
Block a user