Annotation of embedaddon/rsync/testsuite/files-from.test, revision 1.1.1.2

1.1       misho       1: #!/bin/sh
                      2: 
                      3: # Copyright (C) 2008 by Wayne Davison <wayned@samba.org>
                      4: 
                      5: # This program is distributable under the terms of the GNU GPL (see
                      6: # COPYING).
                      7: 
                      8: # Test that --files-from=FILE works right.
                      9: 
                     10: . "$suitedir/rsync.fns"
                     11: 
1.1.1.2 ! misho      12: SSH="$scratchdir/src/support/lsh.sh"
        !            13: 
1.1       misho      14: hands_setup
                     15: 
                     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
                     19: from/./
                     20: from/./dir/subdir
                     21: from/./dir/subdir/subsubdir
                     22: from/./dir/subdir/subsubdir2/
                     23: from/./dir/subdir/foobar.baz
                     24: EOT
                     25: 
                     26: # Create a chkdir without the content that we expect to be omitted.
                     27: $RSYNC -a --exclude=dir/text --exclude='subsubdir/**' "$fromdir/" "$chkdir/"
                     28: 
                     29: checkit "$RSYNC -av --files-from='$scratchdir/filelist' '$scratchdir' '$todir/'" "$chkdir" "$todir"
                     30: 
1.1.1.2 ! misho      31: for filehost in '' 'localhost:'; do
        !            32:     for srchost in '' 'localhost:'; do
        !            33:        if [ -z "$srchost" ]; then
        !            34:            desthost='localhost:'
        !            35:        else
        !            36:            desthost=''
        !            37:        fi
        !            38: 
        !            39:        rm -rf "$todir"
        !            40:        checkit "$RSYNC -avse '$SSH' --rsync-path='$RSYNC' --files-from='$filehost$scratchdir/filelist' '$srchost$scratchdir' '$desthost$todir/'" "$chkdir" "$todir"
        !            41:     done
        !            42: done
        !            43: 
1.1       misho      44: # The script would have aborted on error, so getting here means we've won.
                     45: exit 0

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>