Make grep tests more consistent.
authorMartin Schlemmer <azarah@gentoo.org>
Sun, 4 Sep 2005 20:45:57 +0000 (20:45 +0000)
committerMartin Schlemmer <azarah@gentoo.org>
Sun, 4 Sep 2005 20:45:57 +0000 (20:45 +0000)
eclass/libtool.eclass

index f48da95bb53986ba7a73eb893e1a5496e527102c..565406d0442af1b5170d2d7e40cccfeedb681d42 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2005 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/libtool.eclass,v 1.57 2005/09/04 20:35:42 azarah Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/libtool.eclass,v 1.58 2005/09/04 20:45:57 azarah Exp $
 #
 # Author: Martin Schlemmer <azarah@gentoo.org>
 #
@@ -221,13 +221,13 @@ elibtoolize() {
                                        fi
                                        ;;
                                "uclibc-conf")
-                                       if [[ -e ${x}/configure ]] && \
-                                          grep 'Transform linux' "${x}/configure" > /dev/null ; then
+                                       if [[ -e ${x}/configure && \
+                                             -n $(grep 'Transform linux' "${x}/configure") ]] ; then
                                                ELT_walk_patches "${x}/configure" "${y}"
                                                ret=$?
                                        # ltmain.sh and co might be in a subdirectory ...
-                                       elif [[ ! -e ${x}/configure && -e ${x}/../configure ]] && \
-                                          grep 'Transform linux' "${x}/../configure" > /dev/null ; then
+                                       elif [[ ! -e ${x}/configure && -e ${x}/../configure && \
+                                               -n $(grep 'Transform linux' "${x}/../configure") ]] ; then
                                                ELT_walk_patches "${x}/../configure" "${y}"
                                                ret=$?
                                        fi
@@ -239,13 +239,13 @@ elibtoolize() {
                                        fi
                                        ;;
                                "fbsd-conf")
-                                       if [[ -e ${x}/configure ]] && \
-                                          grep 'version_type=freebsd-' "${x}/configure" > /dev/null ; then
+                                       if [[ -e ${x}/configure && \
+                                             -n $(grep 'version_type=freebsd-' "${x}/configure") ]] ; then
                                                ELT_walk_patches "${x}/configure" "${y}"
                                                ret=$?
                                        # ltmain.sh and co might be in a subdirectory ...
-                                       elif [[ ! -e ${x}/configure && -e ${x}/../configure ]] && \
-                                          grep 'version_type=freebsd-' "${x}/../configure" > /dev/null ; then
+                                       elif [[ ! -e ${x}/configure && -e ${x}/../configure && \
+                                               -n $(grep 'version_type=freebsd-' "${x}/../configure") ]] ; then
                                                ELT_walk_patches "${x}/../configure" "${y}"
                                                ret=$?
                                        fi