#!/bin/bash -v

svn_url=file:///home/ben/svn/frogatto/trunk
#svn up svn
rev=`perl -e 'print (\`svn info $ARGV[0]\` =~ /Revision: (\\d+)/);' $svn_url`
bp="win_builds" #builds path
cp -R -p 'win_template' "$bp/Frogatto r$rev"
rsync -avzP ../files/Frogatto.exe "$bp/Frogatto r$rev/"
#cp -R -p svn/*.cfg svn/*.ttf "$bp/Frogatto r$rev/"
for dir in data images music sounds FreeMono.ttf DejaVuSans.ttf
do
	svn export $svn_url/$dir "$bp/Frogatto r$rev/$dir"
done;
cd "$bp"; zip -r "../../files/Frogatto_r${rev}_Win.zip" "Frogatto r$rev/"
