OSDN Git Service

Use copy-file-to-new-target so that the timestamp will not be kept.
[android-x86/build.git] / tools / fixlinebreaks.sh
1 #!/bin/sh
2 #
3 # Convert EOL convention on source files from CRLF to LF.
4 #
5
6 echo "Scanning..."
7 FILES=`find . \( -iname '*.c' -o -iname '*.cpp' -o -iname '*.h' -o -iname '*.mk' -o -iname '*.html' -o -iname '*.css' \) -print`
8
9 echo "Converting..."
10 for file in $FILES ; do
11         echo $file
12         tr -d \\r < $file > _temp_file
13         mv _temp_file $file
14 done
15 exit 0
16