#!/bin/sh
# Make HTML links to each file in this directory

prefix=`dirname "$0"`
cd `dirname "$0"`
echo "<ul>"
for f in `ls -d --sort=t *.zip`
do
	base=`echo "$f" | awk -F. '{print $1}'`
	t="${base}.tar.gz"
	echo -n "<li><a href=\"$prefix/$f\">$base</a>"
	if [ -r "$base.txt" ]
	then
		echo -n "--"
		cat "$base.txt"
	fi
	echo " Download: <a href=\"$prefix/$f\">.zip w/exe</a> "
	echo "   ("`ls -lah "$f" | awk '{print $5}'`") "
	echo " <a href=\"$prefix/$t\">.tar.gz</a>"
	echo "   ("`ls -lah "$t" | awk '{print $5}'`") "
	echo " (modified "`stat --format "%y" "$f" | awk '{print $1}'`")"
done
echo "</ul>"
