#!/bin/sh
# SLOPPY!
SRC=/home/lx/.plan
DESTDIR=/home/lx/www/0/plan
DEST=$DESTDIR/index.html
DATE=`echo |tai64n|sed -e 's/ //'`
if [ $SRC -nt $DESTDIR/plan.txt ]; then
echo $DATE > $DESTDIR/plan.txt
grep -v -h -e 'Login:' -e 'Directory:' $SRC >> $DESTDIR/plan.txt
cp $DESTDIR/template.html $DEST.tmp
cp $DESTDIR/rss.tmpl $DESTDIR/rss.xml
cp $DESTDIR/plan.txt $DESTDIR/plan$DATE.txt
for file in `ls -r $DESTDIR/plan@*.txt`; do
TMPDATE=`basename $file |sed -e 's/plan//' -e 's/\.txt//'`
sed -e 's/{http.*}/&<\/a>/' $file | sed -e 's/{//g' -e 's/}//g' >> $DEST.tmp
echo -n "
Comment " >> $DEST.tmp
echo "Link " >> $DEST.tmp
echo '