use $__remote_exec for RSYNC_RSH

This commit is contained in:
ander 2021-07-18 16:25:00 +03:00
parent 0e611af2a6
commit 46b5c24cd2
No known key found for this signature in database
GPG key ID: 0A2971E562D618F3

View file

@ -90,6 +90,8 @@ fi
# 4. to understand how that cryptic regex works, please
# open rsync manpage and read about --itemize-changes.
export RSYNC_RSH="$__remote_exec"
# shellcheck disable=SC2086
if ! rsync --dry-run --itemize-changes $options "$src" "$remote_user@$__target_host:$dst" \
| grep -E '^(<|>|c|h|\.|\*)[fdL][cstTpogunbax\.\+\?]+\s' >&2
@ -97,4 +99,6 @@ then
exit 0
fi
echo "export RSYNC_RSH='$__remote_exec'"
echo "rsync $options $src $remote_user@$__target_host:$dst"