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


1.6
date	95.12.17.15.03.21;	author grog;	state Exp;
branches;
next	1.5;

1.5
date	95.12.14.14.02.58;	author grog;	state Exp;
branches;
next	1.4;

1.4
date	95.12.11.14.15.42;	author grog;	state Exp;
branches;
next	1.3;

1.3
date	95.11.16.11.33.07;	author grog;	state Exp;
branches;
next	1.2;

1.2
date	95.11.11.13.25.01;	author grog;	state Exp;
branches;
next	1.1;

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


desc
@Create the table of contents
@


1.6
log
@Third final draft
@
text
@# make-toc: make the file toc.mm
#
# $Id: make-toc,v 1.5 1995/12/14 14:02:58 grog Exp grog $
#
# $Log: make-toc,v $
# Revision 1.5  1995/12/14  14:02:58  grog
# Minor mods
#
# Revision 1.4  1995/12/11  14:15:42  grog
# Checkpoint 12 December
#
#
outfile=$1
shift
if [ ! -f $outfile ]; then 		# no $outfile file yet,
  touch $outfile
fi
echo ".Contents-head Contents" >>$outfile.new
cd Toc; grep -h '><CONTENTS:' $* | sed 's*><CONTENTS: **' >> ../$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

@


1.5
log
@Minor mods
@
text
@d3 1
a3 1
# $Id: make-toc,v 1.4 1995/12/11 14:15:42 grog Exp grog $
d6 3
d18 1
a18 1
echo ".Contents-head" >>$outfile.new
@


1.4
log
@Checkpoint 12 December
@
text
@d3 1
a3 1
# $Id$
d5 3
a7 1
# $Log$
d9 1
a24 1
    echo +++ $outfile unchanged
@


1.3
log
@Minor mods
@
text
@d2 5
a11 1
echo ".so global.mm" >$outfile.new
@


1.2
log
@Minor corrections
@
text
@d2 4
a5 2
if [ ! -f toc.mm ]; then 		# no toc.mm file yet,
  touch toc.mm
d7 3
a9 3
echo ".so global.mm" >toc.mm.new
echo ".Contents-head" >>toc.mm.new
cd Toc; grep -h '><CONTENTS:' $* | sed 's*><CONTENTS: **' >> ../toc.mm.new
d11 3
a13 2
if [ -f toc.mm ]; then	# already have one, is it the same?
  cmp toc.mm toc.mm.new 2> /dev/null  >/dev/null
d15 2
a16 2
    mv toc.mm.new toc.mm
    echo +++ toc.mm changed - need to repeat format
d18 2
a19 2
    echo +++ toc.mm unchanged
    rm toc.mm.new
d22 2
a23 2
 echo +++ toc.mm created - need to repeat format
  mv toc.mm.new toc.mm
@


1.1
log
@Initial revision
@
text
@d2 3
@
