renderpngs.sh 343 Bytes
Newer Older
Christian Müller's avatar
Christian Müller committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
# /bin/bash
shopt -s nullglob
TIMEOUT=1m

for FILE in results/*/*.dot
do
	NAME=$(basename ${FILE} .dot)
	DIR=$(dirname "${FILE}")
	PIC="${DIR}/${NAME}.png"

	echo "Rendering ${FILE} to ${PIC}"
	if
		timeout ${TIMEOUT} time -p dot -Tpng < ${FILE} >> ${PIC} 
	then
		echo "Finished successfully"
	else
		echo "Timeout after ${TIMEOUT}"
	fi
done