From 014e514d63c84a67c0ed9599983581cd901fda01 Mon Sep 17 00:00:00 2001 From: Diego Elio Pettenò Date: Mon, 18 Dec 2006 21:42:53 +0000 Subject: Skip a find(1) execution, use fgrep to match a complete string, and make sure no false targets are outputted on empty commandline (can't use xargs's -r option as it's non-STANDARD). svn path=/trunk/; revision=17 --- patches/fbsd-conf/fbsd-conf.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/patches/fbsd-conf/fbsd-conf.sh b/patches/fbsd-conf/fbsd-conf.sh index 31cbd02..54d727d 100644 --- a/patches/fbsd-conf/fbsd-conf.sh +++ b/patches/fbsd-conf/fbsd-conf.sh @@ -4,9 +4,9 @@ patch_targets() { # Find the configure scripts with a libtool that checks for freebsd # versioning format, and that were not patched with our patch already - find "${WORKDIR}" -name configure -print0 | \ - xargs -0 grep --null -l "version_type=freebsd-" | \ - xargs -0 grep -L 'Handle Gentoo/FreeBSD as it was Linux' + fgrep --null -l --include configure "version_type=freebsd-" "${WORKDIR}" | \ + xargs -0 fgrep -L 'Handle Gentoo/FreeBSD as it was Linux' | \ + fgrep -v '(standard input)' } # This patch is required only on Gentoo/FreeBSD -- cgit v1.2.3-65-gdbad