File: svn-eol-style-from-gitattributes.sh

package info (click to toggle)
darkplaces 0~20180412~beta1-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 18,200 kB
  • sloc: ansic: 176,886; makefile: 485; pascal: 455; perl: 372; objc: 245; sh: 102
file content (22 lines) | stat: -rw-r--r-- 342 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
for F in *; do
	exec 3<.gitattributes
	while read <&3 -r L S; do
		if [ -z "${F##$L}" ]; then
			s=$S
		fi
	done
	case "$s" in
		'-diff -crlf')
			svn propdel svn:eol-style "$F"
			;;
		'-crlf')
			svn propdel svn:eol-style "$F"
			;;
		'crlf=input')
			svn propset svn:eol-style native "$F"
			;;
		*)
			echo "UNKNOWN: $s"
			;;
	esac
done