pwdcheck.sh 495 B

1234567891011121314151617181920
  1. #!/bin/sh
  2. abs_top_builddir="$1"
  3. bd=$(readlink -f "$abs_top_builddir")
  4. cwd=$(readlink -f .)
  5. if [ "$cwd" != "$abs_top_builddir" ]; then
  6. echo "***"
  7. echo "*** WARNING: You moved the build tree away"
  8. if [ "$abs_top_builddir" = "$bd" ]; then
  9. echo "*** from $abs_top_builddir"
  10. else
  11. echo "*** from $bd ($abs_top_builddir)"
  12. fi
  13. echo "*** to $cwd"
  14. echo "***"
  15. echo "*** As such, just-built programs may no longer find their"
  16. echo "*** libraries without a relink."
  17. echo "***"
  18. fi