Patchwork [3/3] autotools.bbclass: use grep -q

login
register
mail settings
Submitter Bernhard Reutner-Fischer
Date Jan. 12, 2011, 8:15 p.m.
Message ID <1294863352-1486-4-git-send-email-rep.dot.nop@gmail.com>
Download mbox | patch
Permalink /patch/259/
State Accepted
Headers show

Comments

Bernhard Reutner-Fischer - Jan. 12, 2011, 8:15 p.m.
-q is a required arg so use it instead of redirecting to /dev/null

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
---
 classes/autotools.bbclass |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

Patch

diff --git a/classes/autotools.bbclass b/classes/autotools.bbclass
index 45b75df..3850ae9 100644
--- a/classes/autotools.bbclass
+++ b/classes/autotools.bbclass
@@ -160,14 +160,14 @@  autotools_do_configure() {
 			else
 			  CONFIGURE_AC=configure.ac
 			fi
-			if grep "^[[:space:]]*AM_GLIB_GNU_GETTEXT" $CONFIGURE_AC >/dev/null; then
-			  if grep "sed.*POTFILES" $CONFIGURE_AC >/dev/null; then
+			if grep -q "^[[:space:]]*AM_GLIB_GNU_GETTEXT" $CONFIGURE_AC; then
+			  if grep -q "sed.*POTFILES" $CONFIGURE_AC; then
 			    : do nothing -- we still have an old unmodified configure.ac
 			  else
 			    oenote Executing glib-gettextize --force --copy
 			    echo "no" | glib-gettextize --force --copy
 			  fi
-			else if grep "^[[:space:]]*AM_GNU_GETTEXT" $CONFIGURE_AC >/dev/null; then
+			else if grep -q "^[[:space:]]*AM_GNU_GETTEXT" $CONFIGURE_AC; then
 			  if [ -e ${STAGING_DATADIR}/gettext/config.rpath ]; then
 			    cp ${STAGING_DATADIR}/gettext/config.rpath ${S}/
 			  else
@@ -181,7 +181,7 @@  autotools_do_configure() {
 			done
 			oenote Executing autoreconf --verbose --install --force ${EXTRA_AUTORECONF} $acpaths
 			autoreconf -Wcross --verbose --install --force ${EXTRA_AUTORECONF} $acpaths || oefatal "autoreconf execution failed."
-			if grep "^[[:space:]]*[AI][CT]_PROG_INTLTOOL" $CONFIGURE_AC >/dev/null; then
+			if grep -q "^[[:space:]]*[AI][CT]_PROG_INTLTOOL" $CONFIGURE_AC; then
 			  oenote Executing intltoolize --copy --force --automake
 			  intltoolize --copy --force --automake
 			fi