head	1.1;
access;
symbols
	fourth_edition:1.1;
locks
	grog:1.1; strict;
comment	@# @;


1.1
date	95.12.17.15.48.59;	author grog;	state Exp;
branches;
next	;


desc
@Make tables file
@


1.1
log
@Initial revision
@
text
@# make-toc: make the file toc.mm
#
# $Id: make-toc,v 1.5 1995/12/14 14:02:58 grog Exp $
#
# $Log: make-toc,v $
#
outfile=$1
shift
if [ ! -f $outfile ]; then 		# no $outfile file yet,
  touch $outfile
fi
echo ".Contents-head Tables" >>$outfile.new
cd Toc; grep -h '><TABLE:' $* | sed 's!><TABLE:!.Sline \"!; s!\(.*\) !\1\" !' >> ../$outfile.new
cd ..
echo ".bp" >>$outfile.new
if [ -f $outfile ]; then	# already have one, is it the same?
  cmp $outfile $outfile.new 2> /dev/null  >/dev/null
  if [ $? -ne 0 ]; then		# changed
    mv $outfile.new $outfile
    echo +++ $outfile changed - need to repeat format
  else
    rm $outfile.new
  fi
else
 echo +++ $outfile created - need to repeat format
  mv $outfile.new $outfile
fi

@
