The Samba-Bugzilla – Attachment 993 Details for
Bug 2395
problems copying from a dir that includes a symlink in the path
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
corrected
dyRsyncSymlinkBug (text/plain), 2.20 KB, created by
Dave Yost
on 2005-02-28 00:02:31 UTC
(
hide
)
Description:
corrected
Filename:
MIME Type:
Creator:
Dave Yost
Created:
2005-02-28 00:02:31 UTC
Size:
2.20 KB
patch
obsolete
>#!/bin/zsh > ># rsync problems with copying from a dir that includes a symlink in the path ># 2005-02-27 Dave@Yost.com > >setupSource() { > rm -rf source > mkdir -p source/dir > ln -s dir source/s > ln -s referent source/dir/symlink > echo nothing > source/dir/file >} > >setupCorrectOutput() { > rm -rf correct-output > mkdir correct-output > cd correct-output > for x in ${opts[@]} > do > mkdir dest${x} > case $x in > *R*) mkdir -p dest${x}/s > case $x in > *L*) cp -p ../source/dir/file dest${x}/s/file > cp -p ../source/dir/file dest${x}/s/symlink > ;; > *l*) cp -p ../source/dir/file dest${x}/s/file > ln -s referent dest${x}/s/symlink > ;; > *) cp -p ../source/dir/file dest${x}/s/file > ;; > esac > ;; > *) case $x in > *L*) cp -p ../source/dir/file dest${x}/file > cp -p ../source/dir/file dest${x}/symlink > ;; > *l*) cp -p ../source/dir/file dest${x}/file > ln -s referent dest${x}/symlink > ;; > *) cp -p ../source/dir/file dest${x}/file > ;; > esac > ;; > esac > done > cd .. >} > >test() { > optsArg=$1 > file=$2 > dest=output/dest${optsArg} > mkdir -p $dest > cd source > echo '###' rsync $optsArg --no-implied-dirs s/$file ../$dest > rsync $optsArg --no-implied-dirs s/$file ../$dest > cd .. > ls -ld $(find $dest) \ > | sed 's,..........................................., ,' >} > >opts=( > -r > -rl > -rLL # hack for for case-insensitive file systems > -rR > -rRl > -rRLL >) > >testGroup() { > for x in ${opts[@]} > test $x $1 >} > >setupSource >setupCorrectOutput >rm -rf output >mkdir output > >testGroup file >testGroup symlink > >dodiff() { > find correct-output -type $1 | sed 's,correct-output/,,' | sed "s,$, $1," >> $c > find output -type $1 | sed 's,output/,,' | sed "s,$, $1," >> $a >} > >c=/tmp/dyRsyncBug$$-$1-correct >a=/tmp/dyRsyncBug$$-$1 >dodiff f >dodiff l > >sort $c > $c-sorted >sort $a > $a-sorted > >echo '###' This diff should produce only lines starting with '=' >echo '###' diff $1 correct vs actual >/usr/bin/diff --old-line-format='< %l >' --unchanged-line-format='= %l >' --new-line-format='> %l >' $c-sorted $a-sorted
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 2395
:
992
| 993