23 lines
495 B
PHP
Executable File
23 lines
495 B
PHP
Executable File
#!/usr/bin/php
|
|
<?php
|
|
require __DIR__ . "/../vendor/autoload.php";
|
|
|
|
use nulib\tools\pman\ComposerFile;
|
|
use nulib\tools\pman\PmanYamlConfigFile;
|
|
use nulib\ValueException;
|
|
|
|
$composer = new ComposerFile();
|
|
$config = new PmanYamlConfigFile();
|
|
|
|
if ($argc <= 1) {
|
|
throw new ValueException("Il faut spécifier le profil à sélectionner");
|
|
}
|
|
$profile = $argv[1];
|
|
|
|
$composer->selectProfile($profile, $config);
|
|
if (getenv("PMAN_COMPOSER_DEBUG")) {
|
|
$composer->print();
|
|
} else {
|
|
$composer->write();
|
|
}
|