#!/bin/sh

makesandbox()
{
touch .backup
echo "./" > .files

touch 1 2 3 4 

mkdir fish
touch fish/1
touch fish/2
touch fish/3
touch fish/4

touch time_conflict
touch type_conflict

dd if=/dev/zero bs=10k count=1 of=size_conflict

touch -r 4 size_conflict

ln -s fish soup

ln -s octopus tree

}

/bin/rm -rf /root/projects/test
mkdir /root/projects/test
touch /root/projects/test/.backup

backup -u > /dev/null

rsh selene "/bin/rm -rf /root/projects/test"
(cd /root/projects; rsync -Rravu test selene:/root/projects )
rsh selene backup -u > /dev/null

mkdir /root/projects/test
( cd /root/projects/test; makesandbox )

rsh selene "/bin/rm -rf /root/projects/test"
(cd /root/projects; rsync -Rravu test selene:/root/projects )
rsh selene backup -u > /dev/null


sleep 1
rsh selene backup -u > /dev/null
sleep 1
rsh selene "cd /root/projects/test; touch new_time_conflict time_conflict copyfromselene"
sleep 1
rsh selene backup -u > /dev/null
sleep 1
touch /root/projects/test/new_time_conflict
backup -u > /dev/null

(cd /root/projects/test; dd if=/dev/zero bs=20k count=1 of=size_conflict; touch -r 4 size_conflict )
(cd /root/projects/test; /bin/rm -f type_conflict; ln -s fish type_conflict ; touch copyfromhecate time_conflict )
backup -u > /dev/null

#(cd /root/projects/test
#mkdir moocow
#cd moocow
#i=0
#
#while [ $i -lt 20 ]; do
#touch $i
#i=`expr $i + 1`
#done
#)



