xref: /openbsd-src/regress/usr.bin/rsync/test4_excludedir.test (revision 3a0ab0b7dc0bc040bcb641a6f2b0af3eb7aa0dc1)
1#! /bin/sh
2
3# testing --exclude basics
4
5. ${tstdir-.}/lib.sh
6. ${tstdir-.}/conf.sh
7
8rm -rf dir1 dir2 dir3
9# make the copy-from-here tree
10mkdir dir1
11cd dir1
12generate_tree_1
13# make the tree we want to compare to
14mkdir ../dir2
15cd ../dir2
16generate_tree_1
17# manually delete the file that should be missing after rsync
18rm one/two/three/four.txt
19rmdir one/two/three
20
21cd ..
22$rsync --exclude two/three -a dir1/ dir3
23compare_trees dir2 dir3
24