]> code.ossystems Code Review - openembedded-core.git/commitdiff
autotools.bbclass: Enhance sed regexp to avoid extra subshell
authorMatthieu Crapet <Matthieu.Crapet@ingenico.com>
Thu, 24 Jul 2014 09:39:43 +0000 (11:39 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 25 Jul 2014 14:33:34 +0000 (15:33 +0100)
head -n1 can be done using sed.

Signed-off-by: Matthieu Crapet <Matthieu.Crapet@ingenico.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/autotools.bbclass

index 19edc54f6d7b6efba8be535b993e9a9e9da0d122..afca760804984e1dab367811b59c484cc70e745e 100644 (file)
@@ -195,7 +195,7 @@ autotools_do_configure() {
                else
                        acpaths="${acpaths}"
                fi
-               AUTOV=`automake --version |head -n 1 |sed "s/.* //;s/\.[0-9]\+$//"`
+               AUTOV=`automake --version | sed -e '1{s/.* //;s/\.[0-9]\+$//};q'`
                automake --version
                echo "AUTOV is $AUTOV"
                if [ -d ${STAGING_DATADIR_NATIVE}/aclocal-$AUTOV ]; then