dbscan.in 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. #!/bin/sh
  2. ###############################################################################
  3. ## (1) Specify variables used by this script. ##
  4. ###############################################################################
  5. LIB_DIR=@nspr_libdir@:@db_libdir@
  6. BIN_DIR=@bindir@
  7. COMMAND=dbscan-bin
  8. ###############################################################################
  9. ## (2) Set the LD_LIBRARY_PATH environment variable to determine the ##
  10. ## search order this command wrapper uses to find shared libraries. ##
  11. ###############################################################################
  12. LD_LIBRARY_PATH=${LIB_DIR}
  13. export LD_LIBRARY_PATH
  14. ###############################################################################
  15. ## (3) Set the PATH environment variable to determine the search ##
  16. ## order this command wrapper uses to find binary executables. ##
  17. ## ##
  18. ## NOTE: Since the wrappers themselves are ALWAYS located in ##
  19. ## "/usr/bin", this directory will always be excluded ##
  20. ## from the search path. Since "/bin" is nothing more ##
  21. ## than a symbolic link to "/usr/bin" on Solaris, this ##
  22. ## directory will also always be excluded from the search ##
  23. ## path on this platform. ##
  24. ###############################################################################
  25. PATH=${BIN_DIR}
  26. export PATH
  27. ###############################################################################
  28. ## (4) Execute the binary executable specified by this command wrapper ##
  29. ## based upon the preset LD_LIBRARY_PATH and PATH environment variables.##
  30. ###############################################################################
  31. ORIGINAL_IFS=${IFS}
  32. IFS=:
  33. for dir in ${PATH}
  34. do
  35. if [ -x ${dir}/${COMMAND} ]
  36. then
  37. IFS=${ORIGINAL_IFS}
  38. ${dir}/${COMMAND} "$@"
  39. exit $?
  40. fi
  41. done
  42. echo "Unable to find \"${COMMAND}\" in \"${PATH}\"!"
  43. exit 255