Add a "base" option for installing only base modules via drush site-install.
This commit is contained in:
parent
360e133164
commit
6489d34660
15
farm.install
15
farm.install
|
@ -57,16 +57,21 @@ function farm_install_modules(array &$install_state) {
|
||||||
$all = farm_modules();
|
$all = farm_modules();
|
||||||
|
|
||||||
// Load the list of modules that should be installed.
|
// Load the list of modules that should be installed.
|
||||||
// If provided, use the modules defined in farm_install_modules.module
|
// If provided, use the modules defined in farm.modules profile argument.
|
||||||
// profile arguments. We assume this is an array of module machine names,
|
// We assume this is an array of module machine names, unless it is simply a
|
||||||
// unless it is simply the string "all", which is a shortcut for installing
|
// string, which is interpreted as a shortcut for installing a set of modules.
|
||||||
// all modules.
|
// Available shortcuts are:
|
||||||
|
// - "all" (installs all modules)
|
||||||
|
// - "base" (installs base modules)
|
||||||
if (!empty($install_state['forms']['farm']['modules'])) {
|
if (!empty($install_state['forms']['farm']['modules'])) {
|
||||||
$modules_arg = $install_state['forms']['farm']['modules'];
|
$modules_arg = $install_state['forms']['farm']['modules'];
|
||||||
|
$all = farm_modules();
|
||||||
if ($modules_arg === 'all') {
|
if ($modules_arg === 'all') {
|
||||||
$all = farm_modules();
|
|
||||||
$modules = array_merge(array_keys($all['base']), array_keys($all['default']), array_keys($all['optional']));
|
$modules = array_merge(array_keys($all['base']), array_keys($all['default']), array_keys($all['optional']));
|
||||||
}
|
}
|
||||||
|
elseif ($modules_arg === 'base') {
|
||||||
|
$modules = array_keys($all['base']);
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
$modules = Json::decode($modules_arg);
|
$modules = Json::decode($modules_arg);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue