File: fixlinebreaks.sh

package info (click to toggle)
android-platform-build 1%3A8.1.0%2Br23-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 8,620 kB
  • sloc: python: 12,074; cpp: 6,068; cs: 5,512; makefile: 2,356; sh: 1,829; java: 1,359; ansic: 987
file content (16 lines) | stat: -rwxr-xr-x 345 bytes parent folder | download | duplicates (5)
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