Debian Codegraph @

scripts/download/pre-commit-crlf

raw symbols SCIP
1 #!/bin/bash
2
3 REPOS="$1"
4 TXN="$2"
5
6 TMP=$(mktemp)
7 trap "rm -f $TMP" 0
8
9 # Make sure that the log message contains some text.
10 SVNLOOK=/usr/bin/svnlook
11
12 $SVNLOOK changed -t "$TXN" "$REPOS" | while read kind file
13 do
14 $SVNLOOK -t "$TXN" cat "$REPOS" "$file" > $TMP
15 file $TMP | grep -q 'with CRLF'
16 if [ $? = 0 ]; then
17 echo "File '$file' contains CRLF line endings" >&2
18 exit 2
19 fi
20 done
21 exit $?
22