[Qa-jenkins-scm] [jenkins.debian.net] 03/05: reproducible: refactor, simplify logic
Holger Levsen
holger at moszumanska.debian.org
Wed Mar 11 21:58:11 UTC 2015
This is an automated email from the git hooks/post-receive script.
holger pushed a commit to branch master
in repository jenkins.debian.net.
commit 0b5eb2f8a34f49df2ed3af20e3aa54038df8c6fa
Author: Holger Levsen <holger at layer-acht.org>
Date: Wed Mar 11 22:49:01 2015 +0100
reproducible: refactor, simplify logic
---
bin/reproducible_html_graphs.sh | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/bin/reproducible_html_graphs.sh b/bin/reproducible_html_graphs.sh
index ee1c3ed..fded809 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,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/qa/jenkins.debian.net.git
More information about the Qa-jenkins-scm
mailing list