aboutsummaryrefslogtreecommitdiff
path: root/toc/troc
blob: 857753103d0b19499770a7205d5f6f09a82b8b8e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh

: ${TROFF:=troff}

if [ ! -t 0 ]; then
	f=`mktemp`
	cat > "$f"
	set -- "$@" "$f"
fi

"$TROFF" -rte=1 -rto=0 -zE "$@" 2>&1 |
"$TROFF" -rte=1 -rto=1 -zE "$@" 2>&1 |
"$TROFF" -rte=0 -rto=1 "$@"
s=$?

[ ! -t 0 ] && rm "$f"
exit $s