From 9fc51701a4581f27cdb8a2b8ef152c13e052721e Mon Sep 17 00:00:00 2001 From: matthew Date: Wed, 12 Nov 2008 18:01:01 +0000 Subject: Cope if files are empty. --- bin/problem-creation-graph | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) (limited to 'bin/problem-creation-graph') diff --git a/bin/problem-creation-graph b/bin/problem-creation-graph index 6aabdecbd..5b7bd238c 100755 --- a/bin/problem-creation-graph +++ b/bin/problem-creation-graph @@ -5,7 +5,7 @@ # Copyright (c) 2008 UK Citizens Online Democracy. All rights reserved. # Email: francis@mysociety.org. WWW: http://www.mysociety.org/ # -# $Id: problem-creation-graph,v 1.4 2008-10-09 14:20:53 matthew Exp $ +# $Id: problem-creation-graph,v 1.5 2008-11-12 18:01:01 matthew Exp $ GPLOT_OUTPUT="set terminal png font 'Vera.ttf' 9 size 1200,400" EXTENSION=".png" @@ -78,11 +78,21 @@ cat >$GPSCRIPT <>$GPSCRIPT " plot \"$SOURCEA\" using 1:2 with impulses lt 3 lw 15 title \"unconfirmed\"," +if [ -s $SOURCEB ]; then +echo -n >>$GPSCRIPT " \"$SOURCEB\" using 1:2 with impulses lt 4 lw 15 title \"confirmed\"," +fi +if [ -s $SOURCEC ]; then +echo -n >>$GPSCRIPT " \"$SOURCEC\" using 1:2 with impulses lt 5 lw 15 title \"fixed\"," +fi +if [ -s $SOURCED ]; then +echo -n >>$GPSCRIPT " \"$SOURCED\" using 1:2 with impulses lt 6 lw 15 title \"hidden\"," +fi +if [ -s $SOURCEE ]; then +echo -n >>$GPSCRIPT " \"$SOURCEE\" using 1:2 with impulses lt 7 lw 15 title \"partial (and any other types)\"," +fi +cat >>$GPSCRIPT <