summaryrefslogtreecommitdiffstats
path: root/tools/fixlinebreaks.sh
blob: 85b7b608e6087422bdaa146392a6703c1c4c71c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh
#
# Convert EOL convention on source files from CRLF to LF.
#

echo "Scanning..."
FILES=`find . \( -iname '*.c' -o -iname '*.cpp' -o -iname '*.h' -o -iname '*.mk' -o -iname '*.html' -o -iname '*.css' \) -print`

echo "Converting..."
for file in $FILES ; do
	echo $file
	tr -d \\r < $file > _temp_file
	mv _temp_file $file
done
exit 0