#!/bin/bash # # Jean-Pierre Sutto, 18 mars 2003, 30 avril, 24 sept 2004, 14 avril 2006 # # usage mindex.sh [radical] # # This is GPL free software rad=$1 echo '------------- mindex -------------' index='index.htm' date=`date +'%d-%m-%y'` titres=`cat $rad.fp | grep titres_propositions | sed -e 's:titres_propositions *= *::g' | sed -e 's: *, *:,:g' | sed -e 's: :@:g' | sed -e 's:,: :g'` tableau=( $titres ) nb=${#tableau[*]} htmlcut=`cat $rad.tex | sed -e 's:%.\+:X:g' | grep -c '\\htmlcut'` if test $htmlcut == 1 then echo "un seul htmlcut, pas d'index." echo "ok" exit 0 fi if test $nb != $( expr $htmlcut - 1) then echo "aie: ll y a $nb titres et $htmlcut htmlcut" fi echo '
Index |