Moved the filter_outfile() function here since it was identical
authorWayne Davison <wayned@samba.org>
Mon, 30 Jan 2006 08:11:50 +0000 (08:11 +0000)
committerWayne Davison <wayned@samba.org>
Mon, 30 Jan 2006 08:11:50 +0000 (08:11 +0000)
in devices.test and itemize.test.

testsuite/rsync.fns

index 5010f73..80c218d 100644 (file)
@@ -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"
 }