f7a356d8b27217c10a170212cf572d4b1e2ae674
[pharext/pharext] / src / pharext_install.tpl.php
1 <?='<?php'?>
2
3 /**
4 * Generated by pharext v<?=pharext\VERSION?> at <?=date("Y-m-d H:i:s T")?>.
5 */
6 namespace pharext;
7
8 use pharext\Cli\Args as CliArgs;
9
10 return function(Installer $installer) {
11 $args = $installer->getArgs();
12 <?php foreach ($configure as $cfg) : ?>
13
14 $args->compile([[
15 null,
16 "<?=$cfg["name"]?>",
17 "<?=ucfirst($cfg["prompt"])?>",
18 CliArgs::OPTARG,
19 <?php if (strlen($cfg["default"])) : ?>
20 "<?=$cfg["default"]?>"
21 <?php else : ?>
22 NULL
23 <?php endif; ?>
24
25 ]]);
26 <?php endforeach; ?>
27
28 return function(Installer $installer) {
29 $args = $installer->getArgs();
30 <?php foreach ($configure as $cfg) : ?>
31
32 if (isset($args["<?=$cfg["name"]?>"])) {
33 $args->configure = "--<?=$cfg["name"]?>=".$args["<?=$cfg["name"]?>"];
34 }
35 <?php endforeach; ?>
36
37 };
38 };