nulib/bin/_pman-composer_select_profile.php

20 lines
445 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);
//$composer->print();
$composer->write();