summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2015-03-11 22:49:01 +0100
committerHolger Levsen <holger@layer-acht.org>2015-03-11 22:49:01 +0100
commit0b5eb2f8a34f49df2ed3af20e3aa54038df8c6fa (patch)
tree59e85a8145f5ffea202798a2245077194260e89d
parenta4909b6902bac9d5fd3e19ec71624cc689867041 (diff)
downloadjenkins.debian.net-0b5eb2f8a34f49df2ed3af20e3aa54038df8c6fa.tar.xz
reproducible: refactor, simplify logic
-rwxr-xr-xbin/reproducible_html_graphs.sh15
1 files changed, 8 insertions, 7 deletions
diff --git a/bin/reproducible_html_graphs.sh b/bin/reproducible_html_graphs.sh
index ee1c3edb..fded809a 100755
--- a/bin/reproducible_html_graphs.sh
+++ b/bin/reproducible_html_graphs.sh
@@ -267,15 +267,16 @@ create_png_from_table() {
# $2 = image file name
# $3 = meta package set, only sensible if $1=6
echo "${FIELDS[$1]}" > ${TABLE[$1]}.csv
- # TABLE[3+4+5] don't have a suite column...
- # 6 is special anyway
- if [ $1 -eq 6 ] ; then
- WHERE_EXTRA="WHERE suite = '$SUITE' and meta_pkg = '$3'"
- elif [ $1 -ne 3 ] && [ $1 -ne 4 ] && [ $1 -ne 5 ] ; then
- WHERE_EXTRA="WHERE suite = '$SUITE'"
- else
+ # prepare query
+ WHERE_EXTRA="WHERE suite = '$SUITE'"
+ if [ $1 -eq 3 ] || [ $1 -eq 4 ] || [ $1 -eq 5 ] ; then
+ # TABLE[3+4+5] don't have a suite column:
WHERE_EXTRA=""
+ elif [ $1 -eq 6 ] ; then
+ # 6 is special too:
+ WHERE_EXTRA="WHERE suite = '$SUITE' and meta_pkg = '$3'"
fi
+ # run query
if [ $1 -eq 1 ] ; then
# not sure if it's worth to generate the following query...
sqlite3 -init ${INIT} --nullvalue 0 -csv ${PACKAGES_DB} "select s.datum,