#!/bin/sh # Crude script to convert formatted manpages to HTML. Requires GROFF_NO_SGR. while : do case $1 in -t) title=$2; shift; shift;; -*) echo "Usage: $0 [-t title] [file(s)]" 1>&2; exit 1;; *) break;; esac done echo "
"
#ESC=`echo x | tr '[x]' '[\033]'`
sed '
	s/\([<>&]\)\1/\1/g
	s/&/\&/g
	s/_\</g
	s/<\</g
	s/\</g
	s/_>/\>/g
	s/>>/\>/g
	s/>/\>/g
	s;_\([^_]\);\1;g
	s;.\(.\);\1;g
	s;\( *\);\1;g
	s;\( *\);\1;g
	# Skip the redundant readme/html_directory blurb. The
	# document names that follow will be hyperlinked.
	/^README FILES/{
		h
		N
		N
		g
	}
' "$@"
echo '  '