3 # Originally by VladimĂr Michl <Vladimir.Michl@hlubocky.del.cz>
5 . $srcdir/testsuite/rsync.fns
8 is_a_link "$1" || test_fail "File $1 is not a symlink"
12 if [ ! -f "$1" ]; then
13 test_fail "File $1 is not regular file or not exists";
18 test_symlink to/links/file1
19 test_symlink to/links/file2
20 test_regular to/links/unsafefile
30 mkdir "from/safe/files"
31 mkdir "from/safe/links"
33 touch "from/safe/files/file1"
34 touch "from/safe/files/file2"
35 touch "from/unsafe/unsafefile"
37 ln -s ../files/file1 "from/safe/links/"
38 ln -s ../files/file2 "from/safe/links/"
39 ln -s ../../unsafe/unsafefile "from/safe/links/"
41 #next rsync copy correctly
43 echo "rsync with relative path";
44 rsync -avv --copy-unsafe-links from/safe/ to
48 #next rsync copy uncorectly - links are copied as files not as links
49 echo "rsync with relative2 path";
50 (cd from; rsync -avv --copy-unsafe-links safe/ ../to)
54 #next rsync copy uncorectly - all links are copied
55 echo "rsync with absolute path";
56 rsync -avv --copy-unsafe-links `pwd`/from/safe/ to