#!/bin/sh
#
# Sync to deploy server
#
rsync -auvzn --exclude=.svn --exclude=var/ ~/localsvn/AppName/$1 ~/Web/AppName/$1
#rsync -auvzn -e ssh --exclude=.svn --exclude=var/ ~/localsvn/AppName/$1 $hostname:~/Web/AppName/$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 --exclude=var/ ~/localsvn/AppName/$1 ~/Web/AppName/$1
		#rsync -auvz -e ssh --exclude=.svn --exclude=var/ ~/localsvn/AppName/$1 $hostname:~/Web/AppName/$1
		exit
	elif [ "$answer" = "n" -o "$answer" = "N" ] ; then
		exit
	fi
done
