3 # Copyright (C) 2008-2020 Wayne Davison
5 # This program is distributable under the terms of the GNU GPL (see
8 # Test that --files-from=FILE works right.
10 .
"$suitedir/rsync.fns"
12 SSH
="$scratchdir/src/support/lsh.sh"
16 # This list of files skips the contents of "subsubdir" but includes
17 # the contents of "subsubdir2" due to its trailing slash.
18 cat >"$scratchdir/filelist" <<EOT
21 from/./dir/subdir/subsubdir
22 from/./dir/subdir/subsubdir2/
23 from/./dir/subdir/foobar.baz
26 # Create a chkdir without the content that we expect to be omitted.
27 $RSYNC -a --exclude=dir
/text
--exclude='subsubdir/**' "$fromdir/" "$chkdir/"
29 checkit
"$RSYNC -av --files-from='$scratchdir/filelist' '$scratchdir' '$todir/'" "$chkdir" "$todir"
31 for filehost
in '' 'localhost:'; do
32 for srchost
in '' 'localhost:'; do
33 if [ -z "$srchost" ]; then
40 checkit
"$RSYNC -avse '$SSH' --rsync-path='$RSYNC' --files-from='$filehost$scratchdir/filelist' '$srchost$scratchdir' '$desthost$todir/'" "$chkdir" "$todir"
44 # The script would have aborted on error, so getting here means we've won.