All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-oe] [PATCH] dos2unix.bbclass: add recipe
@ 2017-06-11 12:54 liu.ming50
  0 siblings, 0 replies; only message in thread
From: liu.ming50 @ 2017-06-11 12:54 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Ming Liu

From: Ming Liu <peter.x.liu@external.atlascopco.com>

Class for use to convert all CRLF line terminators to LF provided
that some projects are being developed/maintained on Windows so they
have different line terminators(CRLF) vs on Linux(LF), which can
cause annoying patching errors during git push/checkout processes.

Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com>
---
 meta-oe/classes/dos2unix.bbclass | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
 create mode 100644 meta-oe/classes/dos2unix.bbclass

diff --git a/meta-oe/classes/dos2unix.bbclass b/meta-oe/classes/dos2unix.bbclass
new file mode 100644
index 0000000..1bad998
--- /dev/null
+++ b/meta-oe/classes/dos2unix.bbclass
@@ -0,0 +1,14 @@
+# Class for use to convert all CRLF line terminators to LF
+# provided that some projects are being developed/maintained
+# on Windows so they have different line terminators(CRLF) vs
+# on Linux(LF), which can cause annoying patching errors during
+# git push/checkout processes.
+
+do_convert_crlf_to_lf[depends] += "dos2unix-native:do_populate_sysroot"
+
+# Convert CRLF line terminators to LF
+do_convert_crlf_to_lf () {
+    find ${S} -type f -exec dos2unix {} \;
+}
+
+addtask convert_crlf_to_lf after do_unpack before do_patch
-- 
2.7.4



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2017-06-11 12:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-11 12:54 [meta-oe] [PATCH] dos2unix.bbclass: add recipe liu.ming50

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.