t=/tmp/T$$
cat >$t
dir=`awk -F: ' NR==1 {print $1;exit} ' $t `
[ -d $APPLDIR/menu ] || mkdir $APPLDIR/menu
awk -F: ' BEGIN {
data="'"$DATADIR"'"
appl="'"$APPLDIR"'"
app="'"$APPL"'"}
{
	m[NR]=$0
	j=NR
}
END {
split (m[1],x)
printf " [ INHEDO 4GT (mr) ] %s [ %s ]\n",x[2],app
printf "%.2d %.2d\n",j-1,x[3]
for (i=2;i<=j;i++ )
{
	split(m[i],x)
	printf "%-35s:",x[1]
	if (x[2]=="M") printf "meng %s/menu/%s\n",appl,x[4]
	else if (x[2]=="F") printf "exec %s/%s/%s.fr %s\n",appl,x[4],x[4],x[5]
	else if (x[2]=="C") printf "%s\n",x[5]
	else if (x[2]=="I") printf "exec info %s/sh/%s/%s %s\n",appl,x[4],x[4],x[5]
	else print "continue"
}
}  ' $t > $APPLDIR/menu/$dir 
chmod 0770  $APPLDIR/menu/$dir 2>/dev/null
rm -f $t
