EC600U_esp32_iap_uart/qcloud-iot/tools/cmake_scripts/convert.sh

13 lines
464 B
Bash
Raw Normal View History

2024-02-05 17:39:56 +08:00
#!/bin/bash
if [ $1 == "linux" ]; then
find $2 -type f -name "*.h" -print -o -name "*.c" -print | xargs -i sed -i '1 s/^\xef\xbb\xbf//' {}
echo "Convert source files to Unix format!!!"
elif [ $1 == "windows" ]; then
find $2 -type f -name "*.h" -print -o -name "*.c" -print | xargs -i sed -i '1 s/^/\xef\xbb\xbf&/' {}
echo "Convert source files to Windows format!!!"
else
echo "Invaild argument!"
echo "Please choose windows or linux !!!"
fi