diff options
Diffstat (limited to '')
-rwxr-xr-x | bin/reprepro_html.sh | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/bin/reprepro_html.sh b/bin/reprepro_html.sh new file mode 100755 index 0000000..a5e56ba --- /dev/null +++ b/bin/reprepro_html.sh @@ -0,0 +1,58 @@ +#!/bin/sh + +set -e + +DISTRIBUTIONS="engywuck engywuck-backports" + +for DISTRIBUTION in ${DISTRIBUTIONS} +do + OUTPUT="/srv/git/progress-linux.org/packages/${DISTRIBUTION}.html" + + if [ ! -e "$(dirname ${OUTPUT})" ] + then + echo "$(dirname ${OUTPUT}) - no such directory" + exit 1 + fi + +cat > "${OUTPUT}" << EOF +<html> +<body> + +<h1>${DISTRIBUTION}</h1> + +<ul> + <li><a href="https://git.progress-linux.org/packages/${DISTRIBUTION}/">Git</a></li> +</ul> + +<table> + +EOF + + PACKAGES="$(wget -q https://git.progress-linux.org/packages/${DISTRIBUTION}/ -O - | grep sublevel-repo | sed -e 's|.*sublevel-repo||' -e "s|.*title='packages/||" -e "s|'.*||")" + + for PACKAGE in ${PACKAGES} + do + +cat >> "${OUTPUT}" << EOF + +<tr> + <td><b>${PACKAGE}:</b></td> + <td><a href="https://packages.qa.debian.org/${PACKAGE}">PTS</a></td> + <td>|</td> + <td><a href="https://git.progress-linux.org/packages/${DISTRIBUTION}/${PACKAGE}/log/?h=debian">Git</a></td> + <td>|</td> + <td><a href="http://snapshot.debian.org/package/${PACKAGE}/">snap</a></td> +</tr> +EOF + + done + +cat >> "${OUTPUT}" << EOF + +</table> + +</body> +</html> +EOF + +done |