root/branches/1.0.x/build/mkdist.php

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 * @package     jBuildTools
5 * @version     $Id$
6 * @author      Jouanneau Laurent
7 * @contributor
8 * @copyright   2006 Jouanneau laurent
9 * @link        http://www.jelix.org
10 * @licence     GNU General Public Licence see LICENCE file or http://www.gnu.org/licenses/gpl.html
11 */
12
13 // arguments :  fichier.lf   chemin_source chemin_dist
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']); // shift the script name
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 ?>
Note: See TracBrowser for help on using the browser.
Download in other formats: Plain Text Original Format