[oe-commits] [openembedded-core] 48/67: libc-common.bbclass: Use sed instead of grep

git at git.openembedded.org git at git.openembedded.org
Thu May 12 10:57:52 UTC 2016


rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit 2e7c03f28d5b1ffb4b0c9d82e13986fb1ce5cb06
Author: Khem Raj <raj.khem at gmail.com>
AuthorDate: Wed May 11 10:35:20 2016 -0700

    libc-common.bbclass: Use sed instead of grep
    
    Squash two install cmds into one
    Replace grep with sed substitution logic, optimizes
    away mv cmd
    
    Signed-off-by: Khem Raj <raj.khem at gmail.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/classes/libc-common.bbclass | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/meta/classes/libc-common.bbclass b/meta/classes/libc-common.bbclass
index bbc8016..11b0065 100644
--- a/meta/classes/libc-common.bbclass
+++ b/meta/classes/libc-common.bbclass
@@ -4,14 +4,12 @@ do_install() {
 		h=`echo $r|sed -e's,\.x$,.h,'`
 		install -m 0644 ${S}/sunrpc/rpcsvc/$h ${D}/${includedir}/rpcsvc/
 	done
-	install -d ${D}/${sysconfdir}/ 
-	install -m 0644 ${WORKDIR}/etc/ld.so.conf ${D}/${sysconfdir}/
+	install -Dm 0644 ${WORKDIR}/etc/ld.so.conf ${D}/${sysconfdir}/ld.so.conf
 	install -d ${D}${localedir}
 	make -f ${WORKDIR}/generate-supported.mk IN="${S}/localedata/SUPPORTED" OUT="${WORKDIR}/SUPPORTED"
 	# get rid of some broken files...
 	for i in ${GLIBC_BROKEN_LOCALES}; do
-		grep -v $i ${WORKDIR}/SUPPORTED > ${WORKDIR}/SUPPORTED.tmp
-		mv ${WORKDIR}/SUPPORTED.tmp ${WORKDIR}/SUPPORTED
+		sed -i "/$i/d" ${WORKDIR}/SUPPORTED
 	done
 	rm -f ${D}${sysconfdir}/rpc
 	rm -rf ${D}${datadir}/zoneinfo

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list