|
Revision 313, 1.0 kB
(checked in by laurentj, 2 years ago)
|
jbuildtools : correction sur des problèmes de paramètres d'appel
|
| Line | |
|---|
| 1 |
<?php |
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
require_once(dirname(__FILE__).'/lib/jManifest.class.php'); |
|---|
| 16 |
|
|---|
| 17 |
if($_SERVER['argc'] < 4){ |
|---|
| 18 |
exit(1); |
|---|
| 19 |
} |
|---|
| 20 |
array_shift($_SERVER['argv']); |
|---|
| 21 |
|
|---|
| 22 |
$options = array('verbose'=>false, 'stripcomment'=>false); |
|---|
| 23 |
|
|---|
| 24 |
if(substr($_SERVER['argv'][0],0,1) == '-'){ |
|---|
| 25 |
$sw = substr(array_shift($_SERVER['argv']),1); |
|---|
| 26 |
$options['verbose'] = (strpos('v', $sw) !== false); |
|---|
| 27 |
$options['stripcomment'] = (strpos('c', $sw) !== false); |
|---|
| 28 |
} |
|---|
| 29 |
|
|---|
| 30 |
try { |
|---|
| 31 |
list($ficlist, $sourcedir, $distdir) = $_SERVER['argv']; |
|---|
| 32 |
jManifest::process($ficlist, $sourcedir, $distdir, $_SERVER, $options['stripcomment'], $options['verbose']); |
|---|
| 33 |
exit(0); |
|---|
| 34 |
}catch(Exception $e){ |
|---|
| 35 |
echo $e->getMessage(); |
|---|
| 36 |
exit(1); |
|---|
| 37 |
} |
|---|
| 38 |
|
|---|
| 39 |
?> |
|---|