X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/a98cad00ebc2f4395fbd35ab9ea01f239b068e24..ef1f62807e55fcd63ce734ef8fd9b32f4e58d659:/testsuite/rsync.fns diff --git a/testsuite/rsync.fns b/testsuite/rsync.fns index 5010f732..80c218dd 100644 --- a/testsuite/rsync.fns +++ b/testsuite/rsync.fns @@ -47,6 +47,20 @@ runtest() { fi } +# Call this if you want to filter out verbose messages (-v or -vv) from +# the output of an rsync run (whittling the output down to just the file +# messages). This isn't needed if you use -i without -v. +filter_outfile() { + sed -e '/^building file list /d' \ + -e '/^created directory /d' \ + -e '/^done$/d' \ + -e '/ --whole-file$/d' \ + -e '/^total: /d' \ + -e '/^$/,$d' \ + <"$outfile" >"$outfile.new" + mv "$outfile.new" "$outfile" +} + printmsg() { echo "$1" }