[Qa-jenkins-scm] [jenkins.debian.net] 01/01: reproducible arch: make webpage pretty

Holger Levsen holger at moszumanska.debian.org
Fri Oct 16 21:51:53 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 f96f24a848c2916d417f30b72626877ffa23cde5
Author: Holger Levsen <holger at layer-acht.org>
Date:   Fri Oct 16 23:51:03 2015 +0200

    reproducible arch: make webpage pretty
---
 bin/reproducible_html_archlinux.sh | 35 ++++++++++++++++++-----------------
 1 file changed, 18 insertions(+), 17 deletions(-)

diff --git a/bin/reproducible_html_archlinux.sh b/bin/reproducible_html_archlinux.sh
index b434238..0df3228 100755
--- a/bin/reproducible_html_archlinux.sh
+++ b/bin/reproducible_html_archlinux.sh
@@ -1,20 +1,20 @@
 #!/bin/bash
 
 # Copyright 2014-2015 Holger Levsen <holger at layer-acht.org>
-#         © 2015 Reiner Herrmann <reiner at reiner-h.de>
 # released under the GPLv=2
 
 DEBUG=false
 . /srv/jenkins/bin/common-functions.sh
 common_init "$@"
 
-# common code defining db access
+# common code
 . /srv/jenkins/bin/reproducible_common.sh
 
 #
-#  finally create the webpage
+#  create the webpage
 #
-cd $BASE/archlinux
+ARCHBASE=$BASE/archlinux
+cd $ARCHBASE
 PAGE=archlinux.html
 echo "$(date -u) - starting to build $PAGE"
 cat > $PAGE <<- EOF
@@ -27,27 +27,28 @@ cat > $PAGE <<- EOF
   <body>
 EOF
 write_page "<table><tr><th>source package</th><th>test date</th><th>1st build log</th><th>2nd build log</th><th>diffoscope output for binary packages</th></tr>"
-for PKG in $(ls * -d1) ; do
-	write_page " <td>$PKG</td>"
-	write_page " <td>$(ls $PKG -dl|cut -d " " -f6-8)</td>"
+for PKG in $(cd $ARCHBASE/$PKG/ ; ls * -d1) ; do
+	write_page " <tr>"
+	write_page "  <td>$PKG</td>"
+	write_page "  <td>$(ls $ARCHBASE/$PKG -dl|cut -d " " -f6-8)</td>"
 	for LOG in build1.log build2.log ; do
-		if [ -f $PKG/$LOG ] ; then
-			write_page " <td><a href=\"$LOG\">$LOG</a></td>"
+		if [ -f $ARCHBASE/$PKG/$LOG ] ; then
+			write_page "  <td><a href=\"/archlinux/$PKG/$LOG\">$LOG</a></td>"
 		else
-			write_page " <td> </td>"
+			write_page "  <td> </td>"
 		fi
 	done
-	if [ -z "$(ls *.pkg.tar.xz.html 2>/dev/null)" ] ; then
-		write_page " <td>failed to build from source</td>"
+	if [ -z "$(cd $ARCHBASE/$PKG/ ; ls *.pkg.tar.xz.html 2>/dev/null)" ] ; then
+		write_page "  <td>failed to build from source</td>"
 	else
-		write_page " <td>"
-		for ARTIFACT in *.pkg.tar.xz.html ; do
-			write_page "  <a href=\"$ARTIFACT\">${ARTIFACT:0:-5}</a><br />"
+		write_page "  <td>"
+		for ARTIFACT in $(cd $ARCHBASE/$PKG/ ; ls *.pkg.tar.xz.html) ; do
+			write_page "   <a href=\"/archlinux/$PKG/$ARTIFACT\">${ARTIFACT:0:-5}</a><br />"
 		done
-		write_page " </td>"
+		write_page "  </td>"
 	fi
+	write_page " </tr>"
 done
-
 write_page "</table>"
 write_page_footer Archlinux
 echo "$(date -u) - enjoy $REPRODUCIBLE_URL/archlinux/$PAGE"

-- 
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