Repository: flex-utilities Updated Branches: refs/heads/develop c1c0b4aee -> 6d79d5b00
npm-flexjs: EOL moved to end so that all scripts are updated, and permissions are modified too to allow execution Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/5cba209e Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/5cba209e Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/5cba209e Branch: refs/heads/develop Commit: 5cba209e12fe44275c06c2c379a4d9198002354a Parents: c1c0b4a Author: Josh Tynjala <[email protected]> Authored: Mon Sep 12 13:09:51 2016 -0700 Committer: Josh Tynjala <[email protected]> Committed: Mon Sep 12 13:09:51 2016 -0700 ---------------------------------------------------------------------- .../dependencies/download_dependencies.js | 34 ++++++++++++++++++-- 1 file changed, 31 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/5cba209e/npm-flexjs/dependencies/download_dependencies.js ---------------------------------------------------------------------- diff --git a/npm-flexjs/dependencies/download_dependencies.js b/npm-flexjs/dependencies/download_dependencies.js index 6aadc2d..ede182d 100644 --- a/npm-flexjs/dependencies/download_dependencies.js +++ b/npm-flexjs/dependencies/download_dependencies.js @@ -32,14 +32,15 @@ var swfObject = require('./SWFObject'); var flatUI = require('./FlatUI'); var installSteps = [ - updateScriptEOL, createDownloadsDirectory, installFlatUI, installFlashPlayerGlobal, installAdobeAIR, installSWFObject, installApacheFlexJS, - installApacheFalcon + installApacheFalcon, + updateScriptEOL, + updateScriptPermissions ]; var currentStep = 0; @@ -52,7 +53,7 @@ function updateScriptEOL() { try { - var dirPath = path.join('js', 'bin'); + var dirPath = path.join(__dirname, '..', 'js', 'bin'); var files = fs.readdirSync(dirPath); do { @@ -81,6 +82,33 @@ function updateScriptEOL() handleInstallStepComplete(); } +function updateScriptPermissions() +{ + var mode = parseInt('755', 8); + try + { + var dirPath = path.join(__dirname, '..', 'js', 'bin'); + var files = fs.readdirSync(dirPath); + do + { + var filePath = files.shift(); + filePath = path.resolve(dirPath, filePath); + if(path.extname(filePath) !== '.bat') + { + //mac, linux, or cygwin scripts + fs.chmodSync(filePath, mode); + } + } + while(files.length > 0) + } + catch(e) + { + handleAbort(); + return; + } + handleInstallStepComplete(); +} + function createDownloadsDirectory() { //Create downloads directory if it does not exist already
