summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2015-03-02 12:02:34 +0100
committerHolger Levsen <holger@layer-acht.org>2015-03-02 12:02:34 +0100
commitd77f816b4ce1084055d2ad52e189cf739b24d409 (patch)
tree03ad108c37b7f05392b56205832cf7fe58a5a24a /bin
parentac3f31fe7f6f507810d74ea210f00db2864c58b3 (diff)
downloadjenkins.debian.net-d77f816b4ce1084055d2ad52e189cf739b24d409.tar.xz
reproducible: fixup: deal gracefully with no results
Diffstat (limited to 'bin')
-rwxr-xr-xbin/reproducible_html_graphs.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/reproducible_html_graphs.sh b/bin/reproducible_html_graphs.sh
index f0bba571..90dedce4 100755
--- a/bin/reproducible_html_graphs.sh
+++ b/bin/reproducible_html_graphs.sh
@@ -220,7 +220,7 @@ redo_png() {
fi
sqlite3 -init ${INIT} -csv ${PACKAGES_DB} "SELECT ${FIELDS[$1]} from ${TABLE[$1]} ${WHERE_EXTRA} ORDER BY datum" >> ${TABLE[$1]}.csv
# only generate graph is the query returned data
- if [ -n "$(tail -1 ${TABLE[$1]}.csv)" ] ; then
+ if [ $(cat ${TABLE[$1]}.csv | wc -l) -gt 1 ] ; then
/srv/jenkins/bin/make_graph.py ${TABLE[$1]}.csv $2 ${COLOR[$1]} "${MAINLABEL[$1]}" "${YLABEL[$1]}"
mv $2 /var/lib/jenkins/userContent/
fi