#!/bin/sh
# 2025-10-13, Nico Schottelius

destdir=/tmp/www/software/gpm/archives
indexhtml=$destdir/index.html

cd software/gpm/archives/
cat > ${indexhtml} <<EOF
<html>
<head>
<title>GPM archives</title>
</head>
<body>
<h1>GPM archives</h1>
<ul>
EOF

find . -type f | sort -g > ${destdir}/index
while read archivelink; do
    echo "<li><a href=\"$archivelink\">$archivelink</a>" >> ${indexhtml}
done < ${destdir}/index

cat >>${indexhtml} <<EOF
</ul>
</body>
</html>
EOF
