* [PATCH] autotools.bbclass: Replace "grep ... >/dev/null" with "grep -q"
@ 2017-03-26 10:24 Robert P. J. Day
0 siblings, 0 replies; only message in thread
From: Robert P. J. Day @ 2017-03-26 10:24 UTC (permalink / raw)
To: OE Core mailing list
For aesthetic style reasons, use "grep -q" instead of ">/dev/null".
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
---
diff --git a/meta/classes/autotools.bbclass b/meta/classes/autotools.bbclass
index d494734..ac04a07 100644
--- a/meta/classes/autotools.bbclass
+++ b/meta/classes/autotools.bbclass
@@ -193,14 +193,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
bbnote Executing glib-gettextize --force --copy
echo "no" | glib-gettextize --force --copy
fi
- elif grep "^[[:space:]]*AM_GNU_GETTEXT" $CONFIGURE_AC >/dev/null; then
+ elif grep -q "^[[:space:]]*AM_GNU_GETTEXT" $CONFIGURE_AC; then
# We'd call gettextize here if it wasn't so broken...
cp ${STAGING_DATADIR_NATIVE}/gettext/config.rpath ${AUTOTOOLS_AUXDIR}/
if [ -d ${S}/po/ ]; then
@@ -212,7 +212,7 @@ autotools_do_configure() {
PRUNE_M4="$PRUNE_M4 gettext.m4 iconv.m4 lib-ld.m4 lib-link.m4 lib-prefix.m4 nls.m4 po.m4 progtest.m4"
fi
mkdir -p m4
- if grep "^[[:space:]]*[AI][CT]_PROG_INTLTOOL" $CONFIGURE_AC >/dev/null; then
+ if grep -q "^[[:space:]]*[AI][CT]_PROG_INTLTOOL" $CONFIGURE_AC; then
if ! echo "${DEPENDS}" | grep -q intltool-native; then
bbwarn "Missing DEPENDS on intltool-native"
fi
--
========================================================================
Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca
Twitter: http://twitter.com/rpjday
LinkedIn: http://ca.linkedin.com/in/rpjday
========================================================================
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2017-03-26 10:24 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-26 10:24 [PATCH] autotools.bbclass: Replace "grep ... >/dev/null" with "grep -q" Robert P. J. Day
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.