VulpesOS/gaia/tests/jsmarionette/runner/mozilla-profile-builder/lib/options/apps.js
OverSu b38dea0597 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.
2026-09-30 23:13:03 +02:00

25 lines
561 B
JavaScript
Executable file

'use strict';
var installApps = require('packaged-webapp').installApps;
function apps(profile, options, callback) {
// abort if no apps are given
if (
// no options
!options ||
// no apps
!options.apps ||
// empty app object
(Object.keys(options.apps).length === 0)
) {
return process.nextTick(callback.bind(null, null, profile));
}
var list = [];
for (var origin in options.apps) {
list.push({ origin: origin, source: options.apps[origin] });
}
installApps(profile, list, callback);
}
module.exports = apps;