dummy-pkg-config.sh 453 B

123456789101112131415161718192021
  1. #!/bin/sh
  2. # This is a replacement for pkg-config that compares the string passed
  3. # to the --exists argument with the PKG_CONFIG_PATH environment variable
  4. # and returns 1 if they are different.
  5. case $1 in
  6. --version)
  7. echo "0.0-cmake-dummy"
  8. ;;
  9. --exists)
  10. shift
  11. eval last=\${$#}
  12. echo "Expected: ${last}"
  13. echo "Found: ${PKG_CONFIG_PATH}"
  14. [ "${last}" = "${PKG_CONFIG_PATH}" ] || exit 1
  15. ;;
  16. *)
  17. exit 255
  18. ;;
  19. esac