diff options
author | John Ankarström <john@ankarstrom.se> | 2021-06-22 21:24:11 +0200 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2021-06-22 21:24:11 +0200 |
commit | a85c6cc8b1f445883389fc65fa170b538291b7d6 (patch) | |
tree | a2dd86ff5475ddb01b1fd64adc88b77f0526e101 /toc/troc | |
parent | 2aedd44170b19b427d9d1f069d63e463d8a38832 (diff) | |
download | mk-a85c6cc8b1f445883389fc65fa170b538291b7d6.tar.gz |
Improve toc.tmac
Diffstat (limited to 'toc/troc')
-rwxr-xr-x | toc/troc | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/toc/troc b/toc/troc new file mode 100755 index 0000000..8577531 --- /dev/null +++ b/toc/troc @@ -0,0 +1,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 |