Skip to content

Instantly share code, notes, and snippets.

View william-ml-leslie's full-sized avatar

William ML Leslie william-ml-leslie

View GitHub Profile
@realityforge
realityforge / all2dos.sh
Created March 25, 2012 22:56
Convert a repository to Unix EOL
#!/bin/bash
# If fromdos is not present on your system you can try the slower: "perl -pi -e 's/\r\n/\n/;'"
find . \( ! -name '.git' -type f -and -name '*.sql' -or -name '*.textile' -or -name '*.css' -or -name '*.html' -or -name '*.java' -or -name '*.js' -or -name '*.jsp' -or -name '*.properties' -or -name '*.txt' -or -name '*.xml' -or -name '*.xsd' -or -name '*.xsl' -or -name '*.rb' -or -name '*.haml' -or -name '*.rake' -or -name '*.sass' -or -name '*.rhtml' -or -name '*.yml' -or -name '*.yaml' -or -name 'LICENSE' -or -name 'CHANGELOG' -or -name 'Rakefile' -or -name 'rakefile' -or -name 'Buildfile' -or -name 'buildfile' -or -name '*.gemspec' -or -name '.gitignore' -or -name '.gitattributes' \) -exec fromdos {} \;