Publish Vulpes Preview 15 sources for desktop, Android and Tundra
Share Gaia assets and adapters, keep private profiles and development documents local, and update both public READMEs.
This commit is contained in:
parent
93e3a48004
commit
b38dea0597
25901 changed files with 9982925 additions and 369 deletions
|
|
@ -0,0 +1,29 @@
|
|||
'use strict';
|
||||
var fse = require('fs-extra');
|
||||
|
||||
/**
|
||||
* Recursively copy a directory of prebuilt files into a profile. Used for
|
||||
* overwriting files in a clean profile for tests.
|
||||
*
|
||||
* Options:
|
||||
* - (Object) extract: Directory to copy into profile.
|
||||
*
|
||||
* @param {String} profile path to profile.
|
||||
* @param {Object} options for directory.
|
||||
* @param {Function} callback fires after successfully copying.
|
||||
*/
|
||||
function copyExtract(profile, options, callback) {
|
||||
// we userPrefs was used in the past
|
||||
var extractsDir = options.extracts;
|
||||
// don't do anything unless there is a directory to copy
|
||||
if (!extractsDir) {
|
||||
return process.nextTick(callback.bind(null, null, profile));
|
||||
}
|
||||
|
||||
fse.copy(extractsDir, profile, function(err) {
|
||||
if (err) return callback(err);
|
||||
return callback(null, profile);
|
||||
});
|
||||
}
|
||||
|
||||
module.exports = copyExtract;
|
||||
Loading…
Reference in a new issue