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";
24 mkdir
"from/safe/files"
25 mkdir
"from/safe/links"
27 touch "from/safe/files/file1"
28 touch "from/safe/files/file2"
29 touch "from/unsafe/unsafefile"
31 ln -s ..
/files
/file1
"from/safe/links/"
32 ln -s ..
/files
/file2
"from/safe/links/"
33 ln -s ..
/..
/unsafe
/unsafefile
"from/safe/links/"
37 echo "rsync with relative path and just -a";
38 $RSYNC -avv from
/safe
/ to
39 test_symlink to
/links
/file1
40 test_symlink to
/links
/file2
41 test_symlink to
/links
/unsafefile
43 echo "rsync with relative path and -a --copy-links"
44 $RSYNC -avv --copy-links from
/safe
/ to
45 test_regular to
/links
/file1
46 test_regular to
/links
/file2
47 test_regular to
/links
/unsafefile
49 echo "rsync with relative path and --copy-unsafe-links";
50 $RSYNC -avv --copy-unsafe-links from
/safe
/ to
51 test_symlink to
/links
/file1
52 test_symlink to
/links
/file2
53 test_regular to
/links
/unsafefile
56 echo "rsync with relative2 path";
57 (cd from
; $RSYNC -avv --copy-unsafe-links safe
/ ..
/to
)
58 test_symlink to
/links
/file1
59 test_symlink to
/links
/file2
60 test_regular to
/links
/unsafefile
63 echo "rsync with absolute path";
64 $RSYNC -avv --copy-unsafe-links `pwd`/from
/safe
/ to
65 test_symlink to
/links
/file1
66 test_symlink to
/links
/file2
67 test_regular to
/links
/unsafefile