[oe-commits] Matthieu Crapet : apmd: avoid pipe with sed

git at git.openembedded.org git at git.openembedded.org
Thu May 8 12:19:16 UTC 2014


Module: openembedded-core.git
Branch: master-next
Commit: 3bfaea36a4484f1db0340cd67f7783ccec23c738
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=3bfaea36a4484f1db0340cd67f7783ccec23c738

Author: Matthieu Crapet <Matthieu.Crapet at ingenico.com>
Date:   Tue May  6 14:17:49 2014 +0200

apmd: avoid pipe with sed

Replace:
cat <file> | sed -e xxx
By:
sed -e xxx <file>

Signed-off-by: Matthieu Crapet <Matthieu.Crapet at ingenico.com>
Signed-off-by: Saul Wold <sgw at linux.intel.com>

---

 meta/recipes-bsp/apmd/apmd_3.2.2-14.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-bsp/apmd/apmd_3.2.2-14.bb b/meta/recipes-bsp/apmd/apmd_3.2.2-14.bb
index 8c4b75e..ab7de65 100644
--- a/meta/recipes-bsp/apmd/apmd_3.2.2-14.bb
+++ b/meta/recipes-bsp/apmd/apmd_3.2.2-14.bb
@@ -65,7 +65,7 @@ do_install() {
 	oe_libinstall -so libapm ${D}${libdir}
 	install -m 0644 apm.h ${D}${includedir}
 
-	cat ${WORKDIR}/init | sed -e 's,/usr/sbin,${sbindir},g; s,/etc,${sysconfdir},g;' > ${D}${sysconfdir}/init.d/apmd
+	sed -e 's,/usr/sbin,${sbindir},g; s,/etc,${sysconfdir},g;' ${WORKDIR}/init > ${D}${sysconfdir}/init.d/apmd
 	chmod 755 ${D}${sysconfdir}/init.d/apmd
 
 	install -d ${D}${systemd_unitdir}/system



More information about the Openembedded-commits mailing list