#!/bin/sh
#
# Sync to deploy server
#
rsync -auvzn --exclude .svn ~/localsvn/Quicty/$1 ~/Web/Quicty/$1
#rsync -auvzn -e ssh --exclude .svn ~/localsvn/Quicty/$1 $hostname:~/Web/Quicty/$1
echo ""
while : ; do
	echo -n "Are you sure ? [y/n] : "
	read answer
	if [ "$answer" = "y" -o "$answer" = "Y" ] ; then
		echo "sync"
		rsync -auvz --exclude .svn ~/localsvn/Quicty/$1 ~/Web/Quicty/$1
		#rsync -auvz -e ssh --exclude .svn ~/localsvn/Quicty/$1 $hostname:~/Web/Quicty/$1
		rsync -auvz --exclude .svn ~/localsvn/Fonts/ ~/Web/Quicty/phplib/Image/Canvas/Fonts/
		#rsync -auvz -e ssh --exclude .svn ~/localsvn/Fonts/ $hostname:~/Web/Quicty/phplib/Image/Canvas/Fonts/
		exit
	elif [ "$answer" = "n" -o "$answer" = "N" ] ; then
		exit
	fi
done
