xref: /OK3568_Linux_fs/yocto/poky/meta/classes/dos2unix.bbclass (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun# Class for use to convert all CRLF line terminators to LF
2*4882a593Smuzhiyun# provided that some projects are being developed/maintained
3*4882a593Smuzhiyun# on Windows so they have different line terminators(CRLF) vs
4*4882a593Smuzhiyun# on Linux(LF), which can cause annoying patching errors during
5*4882a593Smuzhiyun# git push/checkout processes.
6*4882a593Smuzhiyun
7*4882a593Smuzhiyundo_convert_crlf_to_lf[depends] += "dos2unix-native:do_populate_sysroot"
8*4882a593Smuzhiyun
9*4882a593Smuzhiyun# Convert CRLF line terminators to LF
10*4882a593Smuzhiyundo_convert_crlf_to_lf () {
11*4882a593Smuzhiyun	find ${S} -type f -exec dos2unix {} \;
12*4882a593Smuzhiyun}
13*4882a593Smuzhiyun
14*4882a593Smuzhiyunaddtask convert_crlf_to_lf after do_unpack before do_patch
15