summaryrefslogtreecommitdiff
path: root/Build/source/texk/add-info-toc
blob: 60e808cec5b28cf1bd99debf65a03ce675540a56 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh
# Public domain.  Originally written 1994, Karl Berry.
	
temp=${TMPDIR-/tmp}/ait.$$

echo Contents: >$temp
echo >>$temp

awk '
	{ prevline = line; line = $0 }
/^\*+$/	{ print prevline }
/^=+$/	{ print "  " prevline }
/^-+$/	{ print "    " prevline }
/^\.+$/	{ print "      " prevline }
' $*>>$temp

echo >>$temp
echo >>$temp
cat $* >>$temp

mv $temp $1