#!/bin/sh
# Copyright (C) Hans-Albert Schneider, 2001
# $1 : language
lang="$1"
if [ "x$lang" = "x" ]
then
lang="de"
fi
umask 022
# Commands:
# GNU M4:
M4=/usr/bin/m4
# Earl Hood's MHonarc (www.mhonarc.org):
MHONARC=/usr/local/bin/mhonarc
echo "
" > years.html
if [ -r the_years ]
then
the_years=`cat the_years`
else
the_years=`echo [1-9][0-9][0-9][0-9]`
fi
if [ -r std_rcfile_$lang.m4 ]
then
stdrc=std_rcfile_$lang.m4
else
stdrc=../std_rcfile_$lang.m4
fi
for year in $the_years
do
echo "*********** Updating $year"
if [ ! -e "$year" ]
then
mkdir "$year"
elif [ ! -d "$year" ]
then
echo "***** Not a directory!!"
continue
fi
${M4} -I.. -Dyear=$year RCFILE.m4 $stdrc > $year/RCFILE
case $lang in
en) (
echo '- '$year' by date /'
echo ' by thread'
) >> years.html
;;
de|*) (
echo '
- '$year' chronologisch /'
echo ' thematisch'
) >> years.html
;;
esac
if [ -r otherindexes ]
then
start=""
end=""
cat otherindexes | \
while read mrc idx title
do
${M4} -I.. -Dyear=$year RCFILE.m4 $mrc.m4 > $year/$mrc
echo "$start" >> $year/RCFILE
start=""
end=""
echo ' / '"$title" >> years.html
done
echo '
' >> years.html
echo "$end" >> $year/RCFILE
fi
( cd $year; ${MHONARC} -quiet -editidx -rcfile RCFILE )
done
echo "
" >> years.html