Corrected EOL (and EOL fixup script)

This commit is contained in:
skarg
2010-06-01 19:43:15 +00:00
parent 5964f49880
commit ed40541c36
4 changed files with 32 additions and 28 deletions
+6 -3
View File
@@ -1,15 +1,18 @@
#!/bin/sh
# fix DOS/Unix names and Subversion EOL-Style, and remove backup files
#DOS2UNIX=/usr/bin/dos2unix
DOS2UNIX=/usr/bin/fromdos
# exit silently if utility is not installed
[ -x /usr/bin/dos2unix ] || exit 0
[ -x ${DOS2UNIX} ] || exit 0
[ -x /usr/bin/svn ] || exit 0
directory=${1-`pwd`}
for filename in $( find ${directory} -name '*.c' )
do
echo Fixing DOS/Unix ${filename}
/usr/bin/dos2unix ${filename}
${DOS2UNIX} ${filename}
echo Setting Subversion EOL Style for ${filename}
/usr/bin/svn propset svn:eol-style native ${filename}
done
@@ -17,7 +20,7 @@ done
for filename in $( find ${directory} -name '*.h' )
do
echo Fixing DOS/Unix ${filename}
/usr/bin/dos2unix ${filename}
${DOS2UNIX} ${filename}
echo Setting Subversion EOL Style for ${filename}
/usr/bin/svn propset svn:eol-style native ${filename}
done