
# $Id: edprofile,v 1.5 1997/07/08 10:09:35 svein Exp $

BEGIN {
  homeline = 0;
  binline = 0;
  manline = 0;
  docline = 0;
}

$1 == "XITE_HOME=" {
	homeline=NR
	print " " $1 home
	next
}

/^case /, / *\)/ {
	if (binline != 0) {
		print
		next;
	}
	if ( $1 == xite_hosttype ")" ) {
		binline=NR;
		print
		next;
	}
}

$1 == "xite_man=" {
	manline=NR
	print " " $1 man
	next
}

$1 == "XITE_DOC=" {
	docline=NR
	print " " $1 doc
	next
}

{
	if ($1 == "*)" && binline == 0) {
		print "  " xite_hosttype ")"
		print "    xite_bin=" bin
		print "    ;;"
	}

	print $0
}
