Created
November 7, 2012 17:30
-
-
Save aishek/4033090 to your computer and use it in GitHub Desktop.
piece of cake to convert crlftolf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
task 'crlftolf', '', -> | |
execFile( | |
'find' | |
["#{__dirname}/www"] | |
(err, stdout, stderr) -> | |
file_list = stdout.split('\n') | |
for file in file_list | |
if file | |
stats = fs.lstatSync(file) | |
unless stats.isDirectory() | |
tempfile = "#{file}.temp" | |
exec "cat #{file} | tr -d $'\r' > #{tempfile}; rm #{file}; mv #{tempfile} #{file}", {} | |
process.stdout.write("#{file}\n") | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment