#!/bin/sh
#
#	This script is part of rtfdtohtml.
#	Copyright (c) 1996  Elmar Ludwig - Universitaet Osnabrueck
#
#	Edit.app does not use the `\info' tag, so it is inserted here.
#	The basename of the file to convert is used as the title.

t=${1:-"Document"}

title=`expr "$t" : '\(.*\).rtfd/TXT.rtf$' \| "$t" : '\(.*\).rtf$' \| "$t"`
title=`basename "$title"`

sed '1s/^{\\rtf[0-9]*\\[a-z]*/&{\\info{\\title '"$title"'}}/' -- ${1+"$1"}
