.K ""
echo "This script installs the XPR-Libraries after checking if they are"
echo "available. If they are available you will be asked if you really"
echo "want to install them."
echo ""
echo "Dieses Script installiert die XPR-Libraries nachdem es berprft hat"
echo "ob diese nicht schon vorhanden sind. Wenn das der Fall ist werden Sie"
echo "gefragt ob Sie wirklich diese Installation vornehmen wollen."

echo ""
ask "Press Enter to continue - Drcken Sie Enter um fortzufahren"

echo ""
echo "checking - berprfe xprymodem.library..."
if not EXISTS libs:xprymodem.library
  echo "Library does not exist. Installing libs:xprymodem.library..."
  echo "Library existiert nicht. Installiere libs:xprymodem.library..."
  copy xpr_libs/xprymodem.library libs:xprymodem.library
else
  echo "The current version is 2.20 - Die aktuelle Version ist 2.20"
  failat 20
  echo "Found version is: - Die gefundene Version ist:"
  version xprymodem.library 2 20
  if WARN
    echo "Do you want to overwrite the library libs:xprymodem.library? [y/N]"
    ask "Wollen Sie die Library libs:xprymodem.library berschreiben? [y/N]"
    if WARN
      echo "overwriting - berschreibe libs:xprymodem.library..."
      protect libs:xprymodem.library rwed
      copy xpr_libs/xprymodem.library libs:xprymodem.library
    else
      echo "libs:xprymodem.library unchanged - wurde nicht verndert"
    endif
  else
    echo "The installed version is up to date."
    echo "Die installierte Version ist aktuell."
  endif
endif

echo ""
echo "checking - berprfe xprzmodem.library..."
if not EXISTS libs:xprzmodem.library
  echo "Library does not exist. Installing libs:xprzmodem.library..."
  echo "Library existiert nicht. Installiere libs:xprzmodem.library..."
  copy xpr_libs/xprzmodem.library libs:xprzmodem.library
else
  echo "The current version is 2.56 - Die aktuelle Version ist 2.56"
  failat 20
  echo "Found version is: - Die gefundene Version ist:"
  version xprzmodem.library 2 56
  if WARN
    echo "Do you want to overwrite the library libs:xprzmodem.library? [y/N]"
    ask "Wollen Sie die Library libs:xprzmodem.library berschreiben? [y/N]"
    if WARN
      echo "overwriting - berschreibe libs:xprzmodem.library..."
      protect libs:xprzmodem.library rwed
      copy xpr_libs/xprzmodem.library libs:xprzmodem.library
    else
      echo "libs:xprzmodem.library unchanged - wurde nicht verndert."
    endif
  else
    echo "The installed version is up to date."
    echo "Die installierte Version ist aktuell."
  endif
endif

echo ""
echo "checking - berprfe xprzmodem32k.library..."
if not EXISTS libs:xprzmodem32k.library
  echo "Library does not exist. Installing libs:xprzmodem32k.library..."
  echo "Library existiert nicht. Installiere libs:xprzmodem32k.library..."
  copy xpr_libs/xprzmodem32k.library libs:xprzmodem32k.library
else
  echo "The current version is 2.0 - Die aktuelle Version ist 2.0"
  failat 20
  echo "Found version is: - Die gefundene Version ist:"
  version xprzmodem32k.library 2 0
  if WARN
    echo "Do you want to overwrite the library libs:xprzmodem32k.library? [y/N]"
    ask "Wollen Sie die Library libs:xprzmodem32k.library berschreiben? [y/N]"
    if WARN
      echo "overwriting - berschreibe libs:xprzmodem32k.library..."
      protect libs:xprzmodem32k.library rwed
      copy xpr_libs/xprzmodem32k.library libs:xprzmodem32k.library
    else
      echo "libs:xprzmodem32k.library unchanged - wurde nicht verndert."
    endif
  else
    echo "The installed version is up to date."
    echo "Die installierte Version ist aktuell."
  endif
endif

echo ""
echo "checking - berprfe xprbimodem.library..."
if not EXISTS libs:xprbimodem.library
  echo "Library does not exist. Installing libs:xprbimodem.library..."
  echo "Library existiert nicht. Installiere libs:xprbimodem.library..."
  copy xpr_libs/xprbimodem.library libs:xprbimodem.library
else
  echo "The current version is 1.40 - Die aktuelle Version ist 1.40"
  failat 20
  echo "Found version is: - Die gefundene Version ist:"
  version xprbimodem.library 1 40
  if WARN
    echo "Do you want to overwrite the library libs:xprbimodem.library? [y/N]"
    ask "Wollen Sie die Library libs:xprbimodem.library berschreiben? [y/N]"
    if WARN
      echo "overwriting - berschreibe libs:xprbimodem.library..."
      protect libs:xprbimodem.library rwed
      copy xpr_libs/xprbimodem.library libs:xprbimodem.library
    else
      echo "libs:xprbimodem.library unchanged - wurde nicht verndert."
    endif
  else
    echo "The installed version is up to date."
    echo "Die installierte Version ist aktuell."
  endif
endif

echo ""
echo "Finished. Klick on the Close Gadget to get rid of the window."
echo "Fertig. Klicken Sie auf das Close Gadget um das Fenster zu schlieen."
endcli
