aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe
diff options
context:
space:
mode:
authorMing Liu <peter.x.liu@external.atlascopco.com>2017-06-11 14:54:20 +0200
committerMartin Jansa <Martin.Jansa@gmail.com>2017-06-14 14:51:16 +0200
commit1f6be355039da4cd931168c47f64cc0173f61ac6 (patch)
tree9d9566724dd3da3ca6a12ee59f63bcab6b73c75e /meta-oe
parent68a820240bf0663fdf8842f129db2cfc13238db5 (diff)
downloadmeta-openembedded-contrib-1f6be355039da4cd931168c47f64cc0173f61ac6.tar.gz
dos2unix.bbclass: add recipe
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> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe')
-rw-r--r--meta-oe/classes/dos2unix.bbclass14
1 files changed, 14 insertions, 0 deletions
diff --git a/meta-oe/classes/dos2unix.bbclass b/meta-oe/classes/dos2unix.bbclass
new file mode 100644
index 0000000000..1bad998dde
--- /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