2
0

opensslwrap.sh 847 B

12345678910111213141516171819202122
  1. #!/bin/sh
  2. HERE="`echo $0 | sed -e 's|[^/]*$||'`"
  3. OPENSSL="${HERE}../apps/openssl"
  4. if [ -x "${OPENSSL}.exe" ]; then
  5. # The original reason for this script existence is to work around
  6. # certain caveats in run-time linker behaviour. On Windows platforms
  7. # adjusting $PATH used to be sufficient, but with introduction of
  8. # SafeDllSearchMode in XP/2003 the only way to get it right in
  9. # *all* possible situations is to copy newly built .DLLs to apps/
  10. # and test/, which is now done elsewhere... The $PATH is adjusted
  11. # for backward compatibility (and nostagical reasons:-).
  12. if [ "$OSTYPE" != msdosdjgpp ]; then
  13. PATH="${HERE}..:$PATH"; export PATH
  14. fi
  15. exec "${OPENSSL}.exe" "$@"
  16. elif [ -x "${OPENSSL}" -a -x "${HERE}shlib_wrap.sh" ]; then
  17. exec "${HERE}shlib_wrap.sh" "${OPENSSL}" "$@"
  18. else
  19. exec "${OPENSSL}" "$@" # hope for the best...
  20. fi