From: Matthieu Crapet Date: Thu, 24 Jul 2014 09:39:43 +0000 (+0200) Subject: autotools.bbclass: Enhance sed regexp to avoid extra subshell X-Git-Tag: 2015-4~2165 X-Git-Url: https://code.ossystems.io/gitweb?a=commitdiff_plain;h=38d50331acbc1e279449ae6b313ff0116b6c44e8;p=openembedded-core.git autotools.bbclass: Enhance sed regexp to avoid extra subshell head -n1 can be done using sed. Signed-off-by: Matthieu Crapet Signed-off-by: Saul Wold Signed-off-by: Richard Purdie --- diff --git a/meta/classes/autotools.bbclass b/meta/classes/autotools.bbclass index 19edc54f6d..afca760804 100644 --- a/meta/classes/autotools.bbclass +++ b/meta/classes/autotools.bbclass @@ -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