ckpath 686 B

1234567891011121314151617181920212223242526272829303132
  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 l_$$" >x_tpath
  16. chmod +x x_tpath
  17. case x`(x_tpath) 2>/dev/null`
  18. in
  19. xl_$$)
  20. ;;
  21. x)
  22. (cd ../bin ; echo Sorry, . is not in your shell PATH" ($PATH)")
  23. STAT=2 ;;
  24. x$$)
  25. echo Sorry, . is not in your PATH" ($PATH)" or after the ACK bin directory
  26. STAT=3 ;;
  27. *)
  28. echo "Sorry, there is something wrong with your PATH ($PATH)"
  29. STAT=4 ;;
  30. esac
  31. rm -f ../bin/x_tpath x_tpath
  32. exit $STAT