#!/bin/sh
#
# This script is a part of ChiTeX
# By Hung-Yih Chen    
#           Last updated  Jan. 20, 2000
#
#                All rights preserved   
#

  echoprompt=`echo -n "."`
  if test "$echoprompt" = "."; then
     echomode="-n "; echocr=""
  else
     echoprompt=`echo  ".\c"`
     if test "$echoprompt" = "."; then
        echomode=""; echocr="\c"
     else 
        echomode="-e "; echocr="\c"
     fi
  fi


menu ( ) {
clear
echo " "
echo " "
echo "     1. To configure script files: chitex, chitexdvi, chitexpsv,"
echo "        chitexpsv, chilatex, chilatexb, chitran and chitranp"
echo "  "
echo "     2. To update file 'chitex.fdfile' "
echo "        'chitex.fdfile' is a chinese fonts' definition file"
echo "        associate 'chitex.fdf'or 'chitexg.fdf' with fonts really"
echo "        exist which are used at the time of compilation"
echo "  "
echo "     3. To make chinese fmt files "
echo "  "
echo "     q. quit"
echo "  "
echo "     Type '1', '2', '3' to choose one of the above(or type 'q' to quit)"
echo $echomode "     : "$echocr
read inkey
}

menuno="y"
while test "$menuno" = "y"
do   
  menu
  case "$inkey" in
    "1") chitexconfig -scfile; menuno="n";;
    "2") chitexconfig -chitex.fdf; menuno="n";;
    "3") chitexconfig -makefmt; menuno="n";;
    "q") exit;;
      *) menuno="y";;
  esac
done

exit
