[crossfire] LF vs CRLF

Alex Schultz alex_sch at telus.net
Sun Dec 17 00:05:57 CST 2006


For now at least, I just changed the svn:eol-style for the arches and
maps to "LF" (as opposed to deleting the property), as that more
accurately reflects the nature of the files and how they are currently
read. Also, I've made a quick bash script (to be run from the root of
the whole repository) that can verify that all map/arch files are set to
that properly, and if not, set them. It might be good to be run every so
often just to check for newly added maps without the eol-style set properly.

Alex

----

#!/bin/sh
maindir=`pwd`

cd "$maindir"/arch
for foo in `find \( -not -wholename "*/.svn*" \)  -and -type f -and
-name "*.arc"`
do
    output=`svn propget --strict svn:eol-style $foo`
    if [ "$output"x != "LF"x ]; then
       echo "Arch file $foo not set to LF ($output)"
       svn propset svn:eol-style LF "$foo"
    fi
done

cd "$maindir"/maps
for foo in `find \( -not -wholename "*/.svn*" \) -and -type f`
do
    startline=`head -n1 $foo`
    if [ "$startline"x = "arch map"x ]; then
        output=`svn propget --strict svn:eol-style $foo`
        if [ "$output"x != "LF"x ]; then
           echo "Map file $foo not set to LF ($output)"
           svn propset svn:eol-style LF "$foo"
        fi
    fi
done

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3501 bytes
Desc: S/MIME Cryptographic Signature
Url : http://mailman.metalforge.org/pipermail/crossfire/attachments/20061216/1942f32e/attachment.bin 


More information about the crossfire mailing list