summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2015-03-12 16:28:53 +0100
committerHolger Levsen <holger@layer-acht.org>2015-03-12 16:28:53 +0100
commitc3c1507b2379fe22e4cdd46d5c88885e467db322 (patch)
tree0582b51d01217230e26e1cb6c1112a5c4f699f0b /bin
parent01de3e3f74fd082df88314cbe83c9e3198ea967b (diff)
downloadjenkins.debian.net-c3c1507b2379fe22e4cdd46d5c88885e467db322.tar.xz
reproducible: check if standard repo and branch exist and annotate if not
Diffstat (limited to 'bin')
-rwxr-xr-xbin/reproducible_html_repo_stats.sh25
1 files changed, 18 insertions, 7 deletions
diff --git a/bin/reproducible_html_repo_stats.sh b/bin/reproducible_html_repo_stats.sh
index e1a88bc8..ca1a5215 100755
--- a/bin/reproducible_html_repo_stats.sh
+++ b/bin/reproducible_html_repo_stats.sh
@@ -16,6 +16,7 @@ ARCH="amd64" # same
VIEW=repo_stats
PAGE=index_${VIEW}.html
TMPFILE=$(mktemp)
+TMP2FILE=$(mktemp)
echo "$(date) - starting to write $PAGE page."
write_page_header $VIEW "Overview about the reproducible builds apt repository (and comparison to Debian suites)"
@@ -104,16 +105,26 @@ for PKG in $SOURCES ; do
#
# write output
#
- write_page "<tr><td><a href=\"http://anonscm.debian.org/cgit/reproducible/$PKG.git/?h=pu/reproducible_builds\" target=\"_blank\">$PKG</a></td>"
- write_page "<td>$CRUFT</td>"
- write_page "<td>$BET</td>"
- write_page "<td>$CTEST</td>"
- write_page "<td>$CSID</td>"
- write_page "<td>$CEXP</td>"
+ write_page "<tr><td>"
+ URL="http://anonscm.debian.org/cgit/reproducible/$PKG.git/?h=pu/reproducible_builds"
+ curl $URL > $TMP2FILE
+ if [ "$(grep "'error'>No repositories found" $TMP2FILE 2>/dev/null)" ] ; then
+ write_page "$PKG<br /><span class=\"red\">(no git repository)</span>"
+ elif [ "$(grep "'error'>Invalid branch" $TMP2FILE 2>/dev/null)" ] ; then
+ write_page "<a href=\"$URL\" target=\"_blank\">$PKG</a><br /><span class=\"purple\">(non-standard branch)</span>"
+ else
+ write_page "<a href=\"$URL\" target=\"_blank\">$PKG</a>"
+ fi
+ write_page " </td>"
+ write_page " <td>$CRUFT</td>"
+ write_page " <td>$BET</td>"
+ write_page " <td>$CTEST</td>"
+ write_page " <td>$CSID</td>"
+ write_page " <td>$CEXP</td>"
write_page "</tr>"
done
write_page "</table></p>"
-rm $TMPFILE
+rm $TMPFILE $TMP2FILE
write_page_footer
publish_page