#!/bin/csh -fb
# (The "-fb" might need to be changed to "-f" on some systems)
#
set MYFONTDIR=/usr/local/lib/metamail/fonts

if ($?MM_CHARSET) then
    if ($MM_CHARSET == iso-8859-8) then
	mailto $*
	exit
    endif
endif

if (! -d $MYFONTDIR) then
    echo The Hebrew font has not been installed properly on this machine.
    exit
endif

if (! $?DISPLAY) then
    echo Hebrew mail may only be composed under X11 or on a Hebrew terminal.
    exit 
endif
set FPGREP=`xset q | grep $MYFONTDIR`
if ("$FPGREP" == "") then
    echo Adding $MYFONTDIR to your font path.
    xset +fp $MYFONTDIR
else
    echo Your font path appears to be correctly set.
endif
echo Running xterm to compose mail in iso-8859-8, please wait...

setenv MM_CHARSET iso-8859-8
xterm -fn \*iso8859-8 -e mailto $*
