#!/bin/sh
if [ "$ANSI" = "Y" ]; then
  echo -n "[1;33;40mProtocol to use <Z/y/x>: [0;37;40m"
 else
  echo -n "Protocol to use <Z/y/x>: "
fi
read ULPROTOCOL
echo
if [ "$ANSI" = "Y" ]; then
  echo -n "[1;33;40mFile to be downloaded: [0;37;40m"
 else
  echo -n "File to be downloaded: "
fi
read FILENAME
if [ -r $FILENAME ]; then
  if [ "$ANSI" = "Y" ]; then
    echo "[0;37;40mFile $FILENAME not found.[0;37;40m"
    echo "[1;32;40mPress <ENTER> to continue.[0;37;40m"
   else
    echo "File $FILENAME not found."
    echo "Press <ENTER> to continue."
  fi
  exit
fi
echo
if [ "$ULPROTOCOL" = "Z" -o "$ULPROTOCOL" = "z" ];then
  $SZPATH $FILENAME
 else
  if [ "$ULPROTOCOL" = "Y" -o "$ULPROTOCOL" = "y" ];then
    $SYPATH $FILENAME
   else
    if [ "$ULPROTOCOL" = "X" -o "$ULPROTOCOL" = "x" ];then
      $SXPATH $FILENAME
     else
      $SZPATH $FILENAME
    fi
  fi
fi

echo
if [ "$ANSI" = "Y" ]; then
  echo "[1;32;40mPress <ENTER> to continue.[0;37;40m"
 else
  echo "Press <ENTER> to continue."
fi
