#!/bin/sh
# @(#)MENU_HELP version 3.21 created 9/27/93
# @(#)Copyright (c), 1987, 1993 StatSci, Inc.  All rights reserved.

# Helps you get new setting for the help file printing defaults 

CONTINUE=T
PICKED_ONE=F

while [ "$CONTINUE" = "T" ]
do
    # Source file with S-Plus Default Environment variables

    . $SHOME/splus/lib/install/USER.env

    # Run menu for setting Help Printing defaults.
    cat << EOF

Current Command:

EOF
    # Show Print command
    if [ "x$EQN" != x ]
    then
        echo "cat help_file | $EQN | $TROFF $TO | $PRINT"
    else
        echo "cat help_file | $TROFF $TO | $PRINT"
    fi
    cat << EOF

Help Defaults Menu:                     Current Values:

1:    Name of TROFF                     "$TROFF"
2:    Type of TROFF                     "$OLD_NEW"
3:    Arguments for printing to stdout  "$TO"
4:    Name of EQN                       "$EQN"
5:    Print Command                     "$PRINT"
6:    About This Menu
0:    Return to Previous Menu

EOF
echo-n "Enter the number of your choice: "
    read WHICH
    case $WHICH in
    0)    CONTINUE=F;;
    1)    SET_VARS TROFF
          PICKED_ONE=T;;
    2)    SET_VARS OLD_NEW
          PICKED_ONE=T;;
    3)    SET_VARS TO
          PICKED_ONE=T;;
    4)    SET_VARS EQN
          PICKED_ONE=T;;
    5)    SET_VARS PRINT
          PICKED_ONE=T;;
    6)    INTROS HELP;;
    *)    echo "You must enter a number between 0 and 6" ;;
    esac
done

exit 0
