[OE-core] another cleanup: "grep ... >/dev/null" -> "grep -q"?
Robert P. J. Day
rpjday at crashcourse.ca
Sat Mar 25 19:22:34 UTC 2017
something else that grates on me:
$ grep "grep.*/dev/null" *
autotools.bbclass: if grep "^[[:space:]]*AM_GLIB_GNU_GETTEXT" $CONFIGURE_AC >/dev/null; then
autotools.bbclass: if grep "sed.*POTFILES" $CONFIGURE_AC >/dev/null; then
autotools.bbclass: elif grep "^[[:space:]]*AM_GNU_GETTEXT" $CONFIGURE_AC >/dev/null; then
autotools.bbclass: if grep "^[[:space:]]*[AI][CT]_PROG_INTLTOOL" $CONFIGURE_AC >/dev/null; then
insane.bbclass: statement = "grep -e '%s/[^ :]\{1,\}/[^ :]\{1,\}' %s > /dev/null" % (exec_prefix, path)
insane.bbclass: statement = "grep -e 'CROSS COMPILE Badness:' -e 'is unsafe for cross-compilation' %s > /dev/null" % compilelog
insane.bbclass: statement = "grep -e 'CROSS COMPILE Badness:' -e 'is unsafe for cross-compilation' %s > /dev/null" % installlog
insane.bbclass: gnu = "grep \"^[[:space:]]*AM_GNU_GETTEXT\" %s >/dev/null" % config
rootfs-postcommands.bbclass: if grep -q DROPBEAR_EXTRA_ARGS ${IMAGE_ROOTFS}${sysconfdir}/default/dropbear 2>/dev/null ; then
utils.bbclass: if echo "$destpath/" | egrep '^${STAGING_LIBDIR}/' >/dev/null
$
1) can most of those be simplified with "grep -q"?
2) is there any need for "egrep" in that last match?
rday
--
========================================================================
Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca
Twitter: http://twitter.com/rpjday
LinkedIn: http://ca.linkedin.com/in/rpjday
========================================================================
More information about the Openembedded-core
mailing list