diff options
author | Holger Levsen <holger@layer-acht.org> | 2015-03-02 11:51:58 +0100 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2015-03-02 11:51:58 +0100 |
commit | 9d86783635726286f6c3879a0505f33a4d9efa00 (patch) | |
tree | 6d260a2720999e02b32a229a896e6d24489ef42c | |
parent | 22af280c8255d52d53ce33312c0d5305576fd68c (diff) | |
download | jenkins.debian.net-9d86783635726286f6c3879a0505f33a4d9efa00.tar.xz |
reproducible: deal gracefully with no results
-rwxr-xr-x | bin/reproducible_html_graphs.sh | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/bin/reproducible_html_graphs.sh b/bin/reproducible_html_graphs.sh index c11cf6e0..6c8fb3a9 100755 --- a/bin/reproducible_html_graphs.sh +++ b/bin/reproducible_html_graphs.sh @@ -219,9 +219,11 @@ redo_png() { WHERE_EXTRA="" fi sqlite3 -init ${INIT} -csv ${PACKAGES_DB} "SELECT ${FIELDS[$1]} from ${TABLE[$1]} ${WHERE_EXTRA} ORDER BY datum" >> ${TABLE[$1]}.csv - /srv/jenkins/bin/make_graph.py ${TABLE[$1]}.csv $2 ${COLOR[$1]} "${MAINLABEL[$1]}" "${YLABEL[$1]}" + if [ -n "$(cat ${TABLE[$1]}.csv)" ] ; then + /srv/jenkins/bin/make_graph.py ${TABLE[$1]}.csv $2 ${COLOR[$1]} "${MAINLABEL[$1]}" "${YLABEL[$1]}" + mv $2 /var/lib/jenkins/userContent/ + fi rm ${TABLE[$1]}.csv - mv $2 /var/lib/jenkins/userContent/ } write_usertag_table() { |