summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2015-03-02 23:15:52 +0100
committerHolger Levsen <holger@layer-acht.org>2015-03-02 23:15:52 +0100
commit2fd79aaa4a94d4ce4ad261bd0d7f376bc5d6538a (patch)
treebb0934c2d87d756703e6ec1acf8f92bfddca8400 /bin
parent41f5f50dd214fdc9c240dca89baeae03bd08b7a8 (diff)
downloadjenkins.debian.net-2fd79aaa4a94d4ce4ad261bd0d7f376bc5d6538a.tar.xz
ignore-fail-on-non-empty doesnt work as advertised, sigh
Diffstat (limited to 'bin')
-rwxr-xr-xbin/reproducible_html_graphs.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/reproducible_html_graphs.sh b/bin/reproducible_html_graphs.sh
index e07790bb..debb3eb7 100755
--- a/bin/reproducible_html_graphs.sh
+++ b/bin/reproducible_html_graphs.sh
@@ -223,10 +223,11 @@ redo_png() {
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 [ $(cat ${TABLE[$1]}.csv | wc -l) -gt 1 ] ; then
- mkdir -p $(dirname $2)
+ DIR=$(dirname $2)
+ mkdir -p $DIR
/srv/jenkins/bin/make_graph.py ${TABLE[$1]}.csv $2 ${COLOR[$1]} "${MAINLABEL[$1]}" "${YLABEL[$1]}"
mv $2 /var/lib/jenkins/userContent/$SUITE
- rmdir --ignore-fail-on-non-empty $(dirname $2)
+ [ "$DIR" = "." ] || rmdir $(dirname $2)
fi
rm ${TABLE[$1]}.csv
}