pkgconfig: Return appropriate error code from pkgconfig script

Patch by Will Newton.

Currently the wrapper script for pkgconfig clobbers the return status
of pkgconfig. This is a problem for example when someone tries to run
"pkgconfig --exists". This patch should allow the correct return code
to be passed through. Note it uses the "pipefail" option that was
introduced with bash 3.
This commit is contained in:
Peter Korsgaard 2008-04-01 15:29:03 +00:00
parent fd4c4ad6ec
commit 90ee3a0561
1 changed files with 2 additions and 1 deletions

View File

@ -2,6 +2,8 @@
# filter the output from pkg-config (renamed as pkg-config.real)
# and ensures PKG_CONFIG_SYSROOT is prepended to all paths
set -o pipefail
CMD=$0
if [ ! "$PKG_CONFIG_SYSROOT" ]; then
@ -22,6 +24,5 @@ then
#echo "OKAY" >&2;
exit 0;
else
echo "pkg-config failed!" >&2
exit $?
fi