summaryrefslogtreecommitdiffstats
path: root/bin/reprepro_html.sh
blob: a5e56bac25f4f94db66d297ba5039f07c7894c2a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
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