From 6f6d2116e0ba4e6cb2f08868c92002783f7cc5b7 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Thu, 11 Feb 2010 20:47:01 -0500 Subject: cross-pkg-config: tweak path updates with fewer commands Signed-off-by: Mike Frysinger --- wrappers/cross-pkg-config | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/wrappers/cross-pkg-config b/wrappers/cross-pkg-config index 8f19da2..1237a28 100755 --- a/wrappers/cross-pkg-config +++ b/wrappers/cross-pkg-config @@ -103,12 +103,12 @@ output=$(echo "${output}" | sed -e 's:\(-[IL][[:space:]]*\)\(/usr\):\1'"${SYSROO # We turn the output into a newline separate string of options, then use grep # to look for bad -Is and -Ls. Bad -Is and -Ls are ones that point to things # outside the ${SYSROOT}. -bad_lines=$(echo "$output" | # Get the pkg-config output. - tr -s ' ' | tr ' ' '\n' | # Put each flags on its own line. - grep -E '^(-L|-I)' | # Find all -I and -L lines. +bad_lines=$(echo "${output}" | # Get the pkg-config output. + tr -s ' ' '\n' | # Put each flags on its own line. + grep '^-[LI]' | # Find all -I and -L lines. grep -v -E "..${SYSROOT}" # Find all things outside the SYSROOT. ) -if [ -n "$bad_lines" ]; then +if [ -n "${bad_lines}" ] ; then warn "### falling down so here is a dump state ######" pkg-config --debug "$@" 1>&2 warn "### end of dump ###############################" -- cgit v1.2.3-65-gdbad