#!/bin/sh

if [ ! -d /tmp/eman_cache ]; then
	mkdir /tmp/eman_cache
fi
if [ -f "/tmp/eman_cache/$1" ]; then
	less /tmp/eman_cache/$1
	exit 0
fi

dir=eman_$1_`date +%s`
mkdir /tmp/$dir
cd /tmp/$dir
echo "system eflat" > Ace.ace
echo "root ANY" >> Ace.ace
echo "default precompiled (\"\$EIFFEL4/precomp/spec/\$PLATFORM/base\");" >> Ace.ace
echo "cluster eflat: \"./\";" >> Ace.ace
echo "end" >> Ace.ace
es4
es4 -project eflat.epr -flatshort -filter gtroff $1 > out 2>&1
groff -Tascii out > /tmp/eman_cache/$1
less /tmp/eman_cache/$1
cd /tmp
rm -rf /tmp/$dir
exit 0


--!-----------------------------------------------------------------------------
--! The GOTE converter. It converts GTK+ Objects To Eiffel.
--! Copyright (C) 1999 Sam O'Connor
--!
--! This program is free software; you can redistribute it and/or modify
--! it under the terms of the GNU General Public License as published by
--! the Free Software Foundation; either version 2 of the License, or
--! (at your option) any later version.
--!
--! This program is distributed in the hope that it will be useful,
--! but WITHOUT ANY WARRANTY; without even the implied warranty of
--! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
--! GNU General Public License for more details.
--!
--! You should have received a copy of the GNU General Public License
--! along with this program; if not, write to the Free Software
--! Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
--!
--! See file "licence" for more information.
--!-----------------------------------------------------------------------------
