Konstantin Kolinko wrote on Sat, Oct 15, 2011 at 14:27:43 +0400: > 2011/10/14 Daniel Shahaf <d...@daniel.shahaf.name>: > > for f in $CHANGED_FILES; do > > if svnlook pl -t $txn $repos $f | grep -w svn:eol-style >/dev/null && [ > > "`svnlook cat -t $txn $repos $f | xxd -ps -c1 | fgrep 0d | head -n1`" ]; > > then > > exit 1 > > fi > > done > > > > Good, impressive.
Don't deal those adjectives so quickly. I hadn't even tested this thing... > As others noted, one has to check for specific values of svn:eol-style > (native, LF), True > so "svnlook propget" instead of proplist will be needed. > I am not sure about && [ "`...`" ]. Maybe && [ -n "`...`" ] to test > for non-empty strings. Not necessary in this case, since the `` evaluates to either "" or "0d". But, yeah, good style says to add the -n explicitly. > A friendly error message wouldn't hurt either. > And also svnlook and friends should be used by their full paths. That and that were LAAEFTR'd. > Best regards, > Konstantin Kolinko