diff options
Diffstat (limited to 'tools/fixlinebreaks.sh')
-rwxr-xr-x | tools/fixlinebreaks.sh | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tools/fixlinebreaks.sh b/tools/fixlinebreaks.sh new file mode 100755 index 0000000..85b7b60 --- /dev/null +++ b/tools/fixlinebreaks.sh @@ -0,0 +1,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 + |