fix(bin): 🐛 update rsync flags for better progress reporting
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
This commit is contained in:
parent
150ce2008d
commit
d634acab5e
1 changed files with 4 additions and 2 deletions
|
|
@ -841,8 +841,10 @@ if ! ssh -o BatchMode=yes -o ConnectTimeout=5 "$host" "test -d ${dir}" 2>/dev/nu
|
|||
if [ $((_src_local + _dst_local)) -ge 1 ]; then
|
||||
_src_arg=$([ "$_src_local" = 1 ] && printf '%s/' "$_src_dir" || printf '%s:%s/' "$_src_host" "$_src_dir")
|
||||
_dst_arg=$([ "$_dst_local" = 1 ] && printf '%s/' "$dir" || printf '%s:%s/' "$host" "$dir")
|
||||
printf 'rclaude: rsyncing %s → %s ...\n' "$_src_arg" "$_dst_arg" >&2
|
||||
if rsync -a --info=stats1 "$_src_arg" "$_dst_arg" >&2; then
|
||||
printf 'rclaude: rsync -ahz --info=progress2,stats1 %s %s\n' "$_src_arg" "$_dst_arg" >&2
|
||||
# -h human-readable, -z compress over ssh, progress2 = single
|
||||
# rolling progress bar with rate + ETA, stats1 = summary at end.
|
||||
if rsync -ahz --info=progress2,stats1 "$_src_arg" "$_dst_arg" >&2; then
|
||||
_did_rsync=1
|
||||
else
|
||||
echo "rclaude: rsync failed; falling back to empty mkdir" >&2
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue