Ejemplo n.º 1
0
// Include the core bootstrap, this will get the system functional.
require_once(ROOT_PDIR . 'core/bootstrap.php');

$args = new \Core\CLI\Arguments(
	[
		'help' => [
			'description' => 'Display help and exit.',
			'value' => false,
			'shorthand' => ['?', 'h'],
		],
	]
);

$args->processArguments();

if($args->getArgumentValue('help')){
	$args->printUsage();
	exit;
}


$dir = BASE_DIR . 'exports/bundles';
$bundles = [];

// Build a list of all update sources to begin with.
// This is because a bundle can include files from other repositories!
CLI::PrintHeader('Loading Remote Repositories');
$sitecount = 0;
$remoteThemes = [];
$remoteComponents = [];
$updatesites = UpdateSiteModel::Find();
Ejemplo n.º 2
0
	],
    'lang' => [
	    'description' => 'Language to generate the ini',
        'value' => true,
        'required' => false,
    ],
    'dry-run' => [
	    'description' => 'Only perform a "dry-run" test of the import, do not change any file but instead output the resulting .ini to stdout.',
        'value' => false,
    ],
]);
$arguments->usageHeader = 'This script will generate an i18n ini file for the requested component or theme.' . NL . NL .
	$argv[0] . ' --(core|component=[name]|theme=[name]) --lang=[lang]';
$arguments->processArguments();

$lang = $arguments->getArgumentValue('lang');
$component = $arguments->getArgumentValue('component');
$theme = $arguments->getArgumentValue('theme');
$core = $arguments->getArgumentValue('core');

// Shortcut helper to allow the option "-c core" to be used.
if($component == 'core'){
	$component = null;
	$core = true;
}
/*
if(!$lang){
	$arguments->printError('Please specify a language to compile');
	$arguments->printUsage();
	exit;
}
Ejemplo n.º 3
0
	'repackage'    => false,
	// Only list the given [type] and their versions and exit, no saving or bundling.
	'listonly'     => false,
	// component|theme
	'type'         => null,
	// The name of the [type]
	'name'         => null,
	// Display versions along with the listing?
	'listversions' => false,
	// Quiet
    'quiet'        => false,
];


// Process and validate those arguments now.
if($arguments->getArgumentValue('help')){
	$arguments->printUsage();
	exit;
}

if($arguments->getArgumentValue('component')){
	$opts['type'] = 'component';
	$opts['name'] = $arguments->getArgumentValue('component');
}

if($arguments->getArgumentValue('theme')){
	$opts['type'] = 'theme';
	$opts['name'] = $arguments->getArgumentValue('theme');
}

if($arguments->getArgumentValue('list-components')){