#!/bin/bash

BIN=/home/steve/scripts/mkgmap

while :
do
	redis-cli blpop svn:branch-build-trigger 0
	if [ "$?" != "0" ]; then
		echo redis connection failed
		sleep 60
		continue
	fi

	(
	$BIN/mksnapbranches mkgmap
	$BIN/mksnapbranches splitter
	) | mail -s 'Branch builds' steve@parabola.me.uk
	sleep 120
done
