bterm=/usr/bin/bterm
font=/lib/unifont.bgf

if [ -x "$bterm" ] && [ -e "$font" ] && [ -n "$TERM_UTF8" ] && [ -n "$TERM_FRAMEBUFFER" ] && [ "$DEBIAN_FRONTEND" != gtk ]; then
	TERM=bterm
	export TERM
	set +e
	$bterm -f $font -l $LANG /lib/debian-installer/menu
	EXIT=$?
	set -e
else
	rm -f $font
	set +e
	/lib/debian-installer/menu
	EXIT=$?
	set -e
fi
