VERSION=
if [ -d .git ] ; then
 HEAD=`git show --pretty=oneline | head -n1 | cut -d' ' -f1 | cut -b1-16`
 BRANCH=`git branch | grep ^\* | cut -d' ' -f2`
 VERSION=-$BRANCH\_$HEAD
fi

make -s ARCH=arm CROSS_COMPILE=/usr/local/openmoko/arm/bin/arm-angstrom-linux-gnueabi- gta02v5_config
make -s ARCH=arm CROSS_COMPILE=/usr/local/openmoko/arm/bin/arm-angstrom-linux-gnueabi- u-boot.udfu
if [ $? -eq 0 ] ; then
	rm -f u-boot-gta02v5v6*
	cp u-boot.udfu u-boot-gta02v5v6$VERSION.udfu
fi

