of running its own test using ln.
- Made the merge test call checkit with absolute paths so that some
folk's cd command won't foul things up with extra output.
ln -s ../bar/baz/rsync "$fromdir/foo/sym"
umask 022
ln "$fromdir/foo/config1" "$fromdir/foo/extra"
ln -s ../bar/baz/rsync "$fromdir/foo/sym"
umask 022
ln "$fromdir/foo/config1" "$fromdir/foo/extra"
-# Check if the OS can hard-link symlinks or not.
-# (Note: the link we check MUST NOT point to a valid file!)
-ln -s no-such-dir "$to2dir"
-if ln "$to2dir" "$to2dir.test" 2>/dev/null; then
+# Check if rsync is set to hard-link symlinks.
+confile=`echo "$scratchdir" | sed 's;/testtmp/itemize$;/config.h;'`
+if egrep '^#define CAN_HARDLINK_SYMLINK 1' "$confile" >/dev/null; then
-rm -f "$to2dir" "$to2dir.test"
# Check if rsync can preserve time on symlinks
case "$RSYNC" in
# Check if rsync can preserve time on symlinks
case "$RSYNC" in
$RSYNC -av --existing -f 'exclude,! */' from1/ chk/
$RSYNC -av --existing -f 'exclude,! */' from3/ chk/
$RSYNC -av --existing -f 'exclude,! */' from1/ chk/
$RSYNC -av --existing -f 'exclude,! */' from3/ chk/
-checkit "$RSYNC -avv deep/arg-test shallow from1/ from2/ from3/ to/" chk to
+checkit "$RSYNC -avv deep/arg-test shallow from1/ from2/ from3/ to/" "$chkdir" "$todir"
# The script would have aborted on error, so getting here means we've won.
exit 0
# The script would have aborted on error, so getting here means we've won.
exit 0