Fcheck_script.sh 709 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. #!/bin/bash
  2. #set -x
  3. set -o posix
  4. #set -u
  5. #set -e
  6. #+
  7. #
  8. # ================
  9. # Fcheck_script.sh
  10. # ================
  11. #
  12. # --------------------------
  13. # Check
  14. # --------------------------
  15. #
  16. # SYNOPSIS
  17. # ========
  18. #
  19. # ::
  20. #
  21. # $ Fcheck_script.sh
  22. #
  23. #
  24. # DESCRIPTION
  25. # ===========
  26. #
  27. #
  28. # Check if utilities are in the path, typically fcm.
  29. #
  30. # EXAMPLES
  31. # ========
  32. #
  33. # ::
  34. #
  35. # $ ./Fcheck_script.sh fcm
  36. #
  37. #
  38. # TODO
  39. # ====
  40. #
  41. # option debug
  42. #
  43. #
  44. # EVOLUTIONS
  45. # ==========
  46. #
  47. # $Id: Fcheck_script.sh 3294 2012-01-28 16:44:18Z rblod $
  48. #
  49. #
  50. #
  51. # * creation
  52. #
  53. #-
  54. myscript=`which $1`
  55. if [ ${#myscript} -eq 0 ]; then
  56. echo "WARNING !!!"
  57. echo "$1 has to be installed first"
  58. echo "Exiting......................"
  59. exit 1
  60. fi
  61. unset -v myscript