This GitLab instance will be migrated to gitlab.mel.vin before 2020-06-01 and will lose the shared runners, setup your own runners if needed.

Commit 1788e6b7 authored by Vermeeren's avatar Vermeeren

add magical package index tables as html footer

parent 75b29eec
HeaderName header.html
ReadmeName footer.html
Options +Indexes
<IfModule mod_autoindex.c>
IndexOptions NameWidth=* FancyIndexing
......
......@@ -31,8 +31,10 @@ deb-src https://mel.vin/debian/ buster-backports main contrib non-free
### Listing available packages
After adding the repository and running `apt update` you can list the available
packages with this snippet.
The current list of packages can be viewed at https://mel.vin/debian/.
Alternatively, after adding the repository and running `apt update` you can list
the available packages locally with this snippet.
```
for i in /var/lib/apt/lists/mel.vin_debian_dists_*_binary-amd64_Packages; do \
......
#!/bin/sh
{
printf '%s\n' \
'<style type="text/css">
table, td {
border: 1px solid #333;
}
thead, tfoot {
background-color: #333;
color: #fff;
}
</style>'
sed -ne 's/^Codename: //p' conf/distributions | while IFS= read -r i; do
printf '%s\n' \
"<table>
<thead>
<tr>
<th colspan=\"4\">Packages in codename <b>$i</b></th>
</tr>
<tr>
<th>Package</th>
<th>Version</th>
<th>Architecture</th>
<th>Source</th>
</tr>
</thead>
<tbody>"
reprepro --list-format \
'\t\t<tr>\n'\
'\t\t\t<td>${package}</td>\n'\
'\t\t\t<td>${version}</td>\n'\
'\t\t\t<td>${architecture}</td>\n'\
'\t\t\t<td>${source}</td>\n'\
'\t\t</tr>\n' \
list "$i"
printf '%s\n' \
" </tbody>
</table>
<br/>"
done
printf '%s\n' \
'<i>Tables generated by rsync.sh.</i>'
} > footer.html
rsync -a -v --delete-after \
header.html \
footer.html \
.htaccess \
dists \
pool \
melvin@mel.vin:/srv/http/mel.vin/debian
rm footer.html
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment