From c3c1507b2379fe22e4cdd46d5c88885e467db322 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Thu, 12 Mar 2015 16:28:53 +0100 Subject: reproducible: check if standard repo and branch exist and annotate if not --- bin/reproducible_html_repo_stats.sh | 25 ++++++++++++++++++------- 1 file 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 "$PKG" - write_page "$CRUFT" - write_page "$BET" - write_page "$CTEST" - write_page "$CSID" - write_page "$CEXP" + write_page "" + 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
(no git repository)" + elif [ "$(grep "'error'>Invalid branch" $TMP2FILE 2>/dev/null)" ] ; then + write_page "$PKG
(non-standard branch)" + else + write_page "$PKG" + fi + write_page " " + write_page " $CRUFT" + write_page " $BET" + write_page " $CTEST" + write_page " $CSID" + write_page " $CEXP" write_page "" done write_page "

" -rm $TMPFILE +rm $TMPFILE $TMP2FILE write_page_footer publish_page -- cgit v1.2.3-54-g00ecf