#!/bin/bash
#
uppsrc=$1
if [ "" == "$uppsrc" ]; then
	uppsrc="/home/vcas/upp/"
fi

echo "Updating workspace"
svn up

echo "making version file"
ver=`svnversion`
uppver=`svnversion $uppsrc`

cat > svn.version <<EOL
/*
	This file is a trigger for the "Custom build steps.." to
	update version.cpp with latest project revision from svn.
	
	It makes use of the ../svn-version.sh script, since I
	could not make the command work directly from "Custom build steps..".
*/
EOL
echo "const char *cSubversionRevision = \"$ver\";" >> svn.version
echo "const char *cUppSrcRevision = \"$uppver\";" >> svn.version

