Repository: flex-utilities Updated Branches: refs/heads/develop 1bd906072 -> 1cd590f2d
npm-flexjs: batch files get CRLF and other files get LF in js/bin Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/1cd590f2 Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/1cd590f2 Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/1cd590f2 Branch: refs/heads/develop Commit: 1cd590f2d5f136af27dc8f778af9d11f75d1df5c Parents: 1bd9060 Author: Josh Tynjala <[email protected]> Authored: Wed Aug 17 14:21:52 2016 -0700 Committer: Josh Tynjala <[email protected]> Committed: Wed Aug 17 14:21:52 2016 -0700 ---------------------------------------------------------------------- npm-flexjs/dependencies/download_dependencies.js | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/1cd590f2/npm-flexjs/dependencies/download_dependencies.js ---------------------------------------------------------------------- diff --git a/npm-flexjs/dependencies/download_dependencies.js b/npm-flexjs/dependencies/download_dependencies.js index 851e041..d71996d 100644 --- a/npm-flexjs/dependencies/download_dependencies.js +++ b/npm-flexjs/dependencies/download_dependencies.js @@ -57,14 +57,18 @@ function updateScriptEOL() do { var filePath = files.shift(); - if(path.extname(filePath) !== '') - { - //skip windows batch files - continue; - } filePath = path.resolve(dirPath, filePath); var data = fs.readFileSync(filePath, {encoding: 'utf8'}); - data = eol.lf(data); + if(path.extname(filePath) === '.bat') + { + //windows scripts + data = eol.crlf(data); + } + else + { + //mac, linux, or cygwin scripts + data = eol.lf(data); + } fs.writeFileSync(filePath, data, {encoding: 'utf8', mode: 0o755}); } while(files.length > 0)
