From 09c2408c06b890342046178a5cb5369634e55fab Mon Sep 17 00:00:00 2001 From: Russ Magee Date: Fri, 3 Apr 2020 20:08:45 -0700 Subject: [PATCH] Tweaked 'pv' progress bar output format options Signed-off-by: Russ Magee --- go.mod | 1 + go.sum | 2 ++ xs/xs.go | 4 ++-- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index 1e35ba1..f010a64 100644 --- a/go.mod +++ b/go.mod @@ -6,6 +6,7 @@ require ( blitter.com/go/cryptmt v1.0.2 blitter.com/go/goutmp v1.0.2 blitter.com/go/herradurakex v1.0.0 + blitter.com/go/hopscotch v0.0.0-20200320040654-43cb7c7c7e95 // indirect blitter.com/go/kyber v0.0.0-20200130200857-6f2021cb88d9 blitter.com/go/mtwist v1.0.1 // indirect blitter.com/go/newhope v0.0.0-20200130200750-192fc08a8aae diff --git a/go.sum b/go.sum index 7760711..9777f12 100644 --- a/go.sum +++ b/go.sum @@ -12,6 +12,8 @@ blitter.com/go/goutmp v1.0.2 h1:oCc/dt9TlTOP2kvmX1Y7J/wSQUhywjcyF101jXuLxZ8= blitter.com/go/goutmp v1.0.2/go.mod h1:gtlbjC8xGzMk/Cf0BpnVltSa3awOqJ+B5WAxVptTMxk= blitter.com/go/herradurakex v1.0.0 h1:6XaxY+JLT1HUWPF0gYJnjX3pVjrw4YhYZEzZ1U0wkyc= blitter.com/go/herradurakex v1.0.0/go.mod h1:m3+vYZX+2dDjdo+n/HDnXEYJX9pwmNeQLgAfJM8mtxw= +blitter.com/go/hopscotch v0.0.0-20200320040654-43cb7c7c7e95 h1:X6rWBxK+ZqALnpxsk0Rt0VHx5GVLK3Ldz46f+3RCXe8= +blitter.com/go/hopscotch v0.0.0-20200320040654-43cb7c7c7e95/go.mod h1:9Da1oy0t9aUw3wviba+2mP1inbLGbDuCKAO3mmGQha4= blitter.com/go/kyber v0.0.0-20200130200857-6f2021cb88d9 h1:D45AnrNphtvczBXRp5JQicZRTgaK/Is5bgPDDvRKhTc= blitter.com/go/kyber v0.0.0-20200130200857-6f2021cb88d9/go.mod h1:SK6QfGG72lIfKW1Td0wH7f0wwN5nSIhV3K+wvzGNjrw= blitter.com/go/mtwist v1.0.1 h1:PxmoWexfMpLmc8neHP/PcRc3s17ct7iz4d5W/qJVt04= diff --git a/xs/xs.go b/xs/xs.go index 452157f..a4059af 100755 --- a/xs/xs.go +++ b/xs/xs.go @@ -258,7 +258,7 @@ func buildCmdRemoteToLocal(copyQuiet bool, copyLimitBPS uint, destPath, files st } else { // TODO: Query remote side for total file/dir size bandwidthInBytesPerSec := " -L " + fmt.Sprintf("%d ", copyLimitBPS) - displayOpts := " -f -pr " + displayOpts := " -pre " cmd = "/bin/bash" args = []string{"-c", "pv " + displayOpts + bandwidthInBytesPerSec + "| tar -xz -C " + destPath} } @@ -306,7 +306,7 @@ func buildCmdLocalToRemote(copyQuiet bool, copyLimitBPS uint, files string) (cap } else { captureStderr = copyQuiet bandwidthInBytesPerSec := " -L " + fmt.Sprintf("%d", copyLimitBPS) - displayOpts := " -f -pr " + displayOpts := " -pre " cmd = "/bin/bash" args = []string{"-c", "/bin/tar -cz -f /dev/stdout "} files = strings.TrimSpace(files)