#!/bin/sh

libpath=~martin/if/z/library
terp=frotz

story=zedfunge
options=\$MAX_STATIC_DATA=69000 


tempfile=`tempfile`
echo
inform +"$libpath" $options $story.inf >| "$tempfile"
cat "$tempfile" | ( while read line; do if grep "Error"<<<"$line" > /dev/null ; then setterm -bold; echo "$line"; setterm -bold off; else echo "$line"; fi; done; ) | more
if ! tail -1 "$tempfile" | grep error &> /dev/null; then 
	read -n 1 -s char
	if [ silly$char != sillyq ]; then
		$terp $story.z5
	fi
fi
rm -f "$tempfile" &> /dev/null
