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
32
gaia/tests/jsmarionette/runner/mozilla-profile-builder/lib/gaiaprofile.js
Executable file
32
gaia/tests/jsmarionette/runner/mozilla-profile-builder/lib/gaiaprofile.js
Executable file
|
|
@ -0,0 +1,32 @@
|
|||
'use strict';
|
||||
var fsPath = require('path'),
|
||||
fs = require('fs');
|
||||
|
||||
/**
|
||||
* Detects the gaia profile inside of a runtime directory.
|
||||
*
|
||||
* @param {String} path of runtime.
|
||||
* @return {String} location of base profile.
|
||||
*/
|
||||
function gaiaProfile (basePath, callback) {
|
||||
var foundPath = false;
|
||||
var pending = 2;
|
||||
|
||||
function next(path, exists) {
|
||||
if (exists) {
|
||||
foundPath = true;
|
||||
callback(null, path);
|
||||
}
|
||||
|
||||
if (--pending === 0 && !foundPath) {
|
||||
callback(new Error('could not find path to gaia profile'));
|
||||
}
|
||||
}
|
||||
|
||||
var linux = fsPath.join(basePath, 'gaia', 'profile');
|
||||
fs.exists(linux, next.bind(null, linux));
|
||||
var macos = fsPath.join(basePath, 'Contents', 'Resources', 'gaia', 'profile');
|
||||
fs.exists(macos, next.bind(null, macos));
|
||||
}
|
||||
|
||||
module.exports = gaiaProfile;
|
||||
Loading…
Reference in a new issue