3 # copy or link this to processlog to make it run when logs are rotated
6 echo "Syntax: $0 <file>"
8 elif [ ! -r $file ] ; then
9 echo $file does not exist
13 file="`readlink -fm "$1"`"
14 irclog2html=`readlink -fm scripts/irclog2html.pl`
15 htmlcalidx=`readlink -fm scripts/htmlcalidx.sh`
16 # pull date out of path
17 date=`echo "${file}"|sed -e 's~.*\([0-9]\{4\}\)/\([0-9]\{4\}\)$~\1\2~'`
20 # delete old web pages if present (to allow re-running)
21 rm -f $web/$date.html $web/*/$date.html $web/$date.html.gz $web/*/$date.html.gz
23 (cd $web;${irclog2html} ${date} < $file)
24 # set the date to the log date
25 touch -r $file $web/$date.html $web/*/$date.html
27 gzip -f -9 $web/$date.html $web/*/$date.html
29 #don't run stats if not yesterdays log
30 if [ "$date" != "`date -u -d '1 day ago' +'%Y%m%d'`" ] ; then
35 # only do stats if NOSTATS not set
36 if [ -z "$NOSTATS" ] ; then
38 [ -r .log ] && rm .log
45 if [ -z "$NOSTATS" ] ; then
46 for a in `find $web -type d|sort` ; do
47 (cd $a ; ${htmlcalidx} > HEADER.html)
49 rm $web/stats/HEADER.html
52 if [ -z "$NOCOMPRESS" ] ; then