#!/bin/sh
# Generate an HTML page with the files that have changed in the last 10 days

DISTDIR=/users/ptII/adm/dists/ptolemy-latest

cat <<EOF
<html>
<head>
<title>Ptolemy II Changed files</title>
</head>
<body bgcolor="#faf0e6">
<h1>Ptolemy II Changed files</h1>
Below are the Ptolemy II files that have changed in the last 10 days
<table>
EOF

cd $DISTDIR
find . -name *.java -mtime -10 -ls | awk '{
	file = $NF
	print $8,$9,$10, file
}' | sort | awk '{
	print "<tr><td>",$1,$2,$3
	file = substr($4,2,length($4) -1 )
	print "<a href=\"http://ptolemy.eecs.berkeley.edu/~ptdesign/java/ptdesign-java" file "\"><code>" file "</code>"
'}
cat <<EOF
</table>
<p>This page is automatically generated by /users/ptII/adm/bin/findchanges
<p>Last update: `date`

EOF
