File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / rsync / testsuite / files-from.test
Revision 1.1.1.2 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Mon Oct 14 07:51:15 2013 UTC (10 years, 8 months ago) by misho
Branches: rsync, MAIN
CVS tags: v3_1_2p5, RSYNC3_1_0, HEAD
v 3.1.0

    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: 
   12: SSH="$scratchdir/src/support/lsh.sh"
   13: 
   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: 
   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: 
   44: # The script would have aborted on error, so getting here means we've won.
   45: exit 0

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