ckpath 964 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. rm -f ../bin/x_tpath x_tpath
  2. echo "echo $$" >../bin/x_tpath
  3. rm -f x_tpath
  4. chmod +x ../bin/x_tpath
  5. case x`(x_tpath) 2>/dev/null`
  6. in
  7. x$$)
  8. STAT=0 ;;
  9. x)
  10. (cd ../bin ; echo Sorry, `pwd` is not in your shell PATH" ($PATH)")
  11. STAT=1 ;;
  12. *)
  13. echo "Sorry, there is something wrong with your PATH ($PATH)" ;;
  14. esac
  15. echo "echo t_$$" > X_Y_Z_
  16. chmod +x X_Y_Z_
  17. case x`X_Y_Z_`
  18. in
  19. xt_$$)
  20. ;;
  21. x)
  22. (cd ../bin ; echo Sorry, . is not in your shell PATH" ($PATH)")
  23. STAT=2 ;;
  24. *)
  25. echo "Sorry, there is something wrong with your PATH ($PATH)" ;;
  26. esac
  27. rm -f X_Y_Z_
  28. case $STAT
  29. in
  30. 2)
  31. ;;
  32. *)
  33. hash -r ;;
  34. esac
  35. echo "echo l_$$" >x_tpath
  36. chmod +x x_tpath
  37. case x`(x_tpath) 2>/dev/null`
  38. in
  39. xl_$$)
  40. ;;
  41. x)
  42. (cd ../bin ; echo Sorry, . is not in your shell PATH" ($PATH)")
  43. STAT=2 ;;
  44. x$$)
  45. echo Sorry, . is not in your PATH" ($PATH)" or after the ACK bin directory
  46. STAT=3 ;;
  47. *)
  48. echo "Sorry, there is something wrong with your PATH ($PATH)"
  49. STAT=4 ;;
  50. esac
  51. rm -f ../bin/x_tpath x_tpath
  52. exit $STAT