diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2021-05-09 04:21:55 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2021-05-09 04:21:55 +0000 |
commit | 453cc058d9ee6d7cb47529d99061216e72149a5f (patch) | |
tree | 38e3683d9cb52c2f181d65ba513554a5e1387f20 /bin/reprepro_html.sh | |
parent | Initial commit. (diff) | |
download | progress-linux-tools-453cc058d9ee6d7cb47529d99061216e72149a5f.tar.xz progress-linux-tools-453cc058d9ee6d7cb47529d99061216e72149a5f.zip |
Adding bin.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
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 |