On some distros such as Ubuntu 10.04, dos2unix is replaced by
fromdos. Reference:
http://www.virtualhelp.me/linux/164-dos2unix-missing-ubuntu-1004
Fix the following error:
| NOTE: Applying patch 'TestFloat-powerpc-E500v2-SPE-1.patch'
| (../meta-fsl-ppc/recipes-test/testfloat/files/TestFloat-powerpc-E500v2
| -SPE-1.patch)
| ERROR: Error executing a python function in ../meta-fsl-ppc/recipes-test/testfloat/testfloat_2a.bb:
| CmdError: Command Error: exit status: 1 Output:
Signed-off-by: Ting Liu <b28495@freescale.com>
do_unpack2(){
mv ${WORKDIR}/SoftFloat-2b ${S}/SoftFloat-2b
cd ${S}
- find -type f -exec dos2unix {} \;
+ if [ -n "$(which fromdos)" ];then
+ find -type f -exec fromdos {} \;
+ elif [ -n "$(which dos2unix)" ];then
+ find -type f -exec dos2unix {} \;
+ else
+ echo -e "\nERROR: command dos2unix or fromdos not found\n" && return 1
+ fi
}
addtask do_unpack2 after do_unpack before do_patch