summaryrefslogtreecommitdiff
path: root/StoneIsland/platforms/ios/cordova/lib/copy-www-build-step.js
diff options
context:
space:
mode:
Diffstat (limited to 'StoneIsland/platforms/ios/cordova/lib/copy-www-build-step.js')
-rwxr-xr-xStoneIsland/platforms/ios/cordova/lib/copy-www-build-step.js14
1 files changed, 9 insertions, 5 deletions
diff --git a/StoneIsland/platforms/ios/cordova/lib/copy-www-build-step.js b/StoneIsland/platforms/ios/cordova/lib/copy-www-build-step.js
index 7a81b93e..7caa200f 100755
--- a/StoneIsland/platforms/ios/cordova/lib/copy-www-build-step.js
+++ b/StoneIsland/platforms/ios/cordova/lib/copy-www-build-step.js
@@ -32,7 +32,6 @@ var BUILT_PRODUCTS_DIR = process.env.BUILT_PRODUCTS_DIR,
var path = require('path'),
fs = require('fs'),
shell = require('shelljs'),
- glob = require('glob'),
srcDir = 'www',
dstDir = path.join(BUILT_PRODUCTS_DIR, FULL_PRODUCT_NAME),
dstWwwDir = path.join(dstDir, 'www');
@@ -46,7 +45,7 @@ try {
fs.statSync(srcDir);
} catch (e) {
console.error('Path does not exist: ' + srcDir);
- process.exit(1);
+ process.exit(2);
}
// Code signing files must be removed or else there are
@@ -57,11 +56,16 @@ shell.rm('-rf', path.join(dstDir, 'PkgInfo'));
shell.rm('-rf', path.join(dstDir, 'embedded.mobileprovision'));
// Copy www dir recursively
+var code;
if(!!COPY_HIDDEN) {
- shell.mkdir('-p', dstWwwDir);
- shell.cp('-r', glob.sync(srcDir + '/**', { dot: true }), dstWwwDir);
+ code = shell.exec('rsync -Lra "' + srcDir + '" "' + dstDir + '"').code;
} else {
- shell.cp('-r', srcDir, dstDir);
+ code = shell.exec('rsync -Lra --exclude="- .*" "' + srcDir + '" "' + dstDir + '"').code;
+}
+
+if(code !== 0) {
+ console.error('Error occured on copying www. Code: ' + code);
+ process.exit(3);
}
// Copy the config.xml file.