2011-06-07 20:27:31 +00:00
|
|
|
#!/bin/sh -ex
|
|
|
|
|
|
|
|
dotest() {
|
|
|
|
src=$1
|
|
|
|
desti=$2
|
|
|
|
destdn=$3
|
|
|
|
n=$4
|
|
|
|
|
2011-07-05 22:57:26 +00:00
|
|
|
touch ./$src/src$n
|
|
|
|
touch ./$desti/desti$n
|
|
|
|
ln ./$desti/desti$n ./$destdn/destdn$n
|
2011-06-07 20:27:31 +00:00
|
|
|
|
2011-07-05 22:57:26 +00:00
|
|
|
mv ./$src/src$n ./$destdn/destdn$n
|
2011-06-07 20:27:31 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
# srcdn=destdn=desti
|
|
|
|
dotest 'a' 'a' 'a' 1
|
|
|
|
|
|
|
|
# destdn=desti
|
|
|
|
dotest 'b' 'a' 'a' 2
|
|
|
|
|
|
|
|
# srcdn=destdn
|
|
|
|
dotest 'a' 'b' 'a' 3
|
|
|
|
|
|
|
|
# srcdn=desti
|
|
|
|
dotest 'a' 'a' 'b' 4
|
|
|
|
|
|
|
|
# all different
|
|
|
|
dotest 'a' 'b' 'c' 5
|
|
|
|
|