Mention the chmod utility's manpage number.
[rsync/rsync.git] / testsuite / rsync.fns
index a59742a..80c218d 100644 (file)
@@ -32,6 +32,9 @@ else
     diffopt="-c"
 fi
 
+HOME="$scratchdir"
+export HOME
+
 runtest() {
     echo $ECHO_N "Test $1: $ECHO_C"
     if eval "$2"
@@ -44,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"
 }
@@ -92,7 +109,7 @@ hands_setup() {
     ln -s nolf "$fromdir/nolf-symlink"
     umask 022
 
-    cat $srcdir/*.c > "$fromdir/text"
+    cat "$srcdir"/*.c > "$fromdir/text"
     mkdir "$fromdir/dir"
     cp "$fromdir/text" "$fromdir/dir"
     mkdir "$fromdir/dir/subdir"