Changeset 2733
- Timestamp:
- 01/21/06 14:20:48 (3 years ago)
- Files:
-
- trunk/support/checkManifest.php (modified) (4 diffs)
- trunk/support/findComponents.sh (modified) (1 diff)
- trunk/support/makedist2.sh (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/support/checkManifest.php
r2732 r2733 1 1 <?php 2 2 $tmpfile = $argv[1]; 3 $debug = $argv[2]; 3 4 4 5 $manifests = file_get_contents($tmpfile); … … 10 11 foreach (explode ("\n", $manifests) as $num => $file ) 11 12 { 13 if ($debug == 1 ) { 14 echo $file . "\n"; 15 } 12 16 if ($file != '') 13 17 { 14 $component = check_component($file); 15 if ($component) 18 $component = check_component($file, $debug); 19 if ($component == -1 ) { 20 echo "\n$file contains errors fix them before continuing!!\n"; 21 exit ( 1); 22 } 23 if ( $component ) 16 24 { 17 25 $pear_manifests[] = $component; 18 } 26 } 27 19 28 } 20 29 } … … 22 31 echo implode ("\n", $pear_manifests); 23 32 24 function check_component($file )33 function check_component($file, $debug) 25 34 { 26 35 … … 29 38 if (!file_exists($component['manifest_file'])) 30 39 { 40 return -1; 31 41 die("Component manifest {$component['manifest_file']} not found.\n"); 32 42 } 33 43 34 44 // Read the manifest 35 eval('$component[\'manifest\'] = Array('.file_get_contents($component['manifest_file']).');'); 45 46 47 eval('$component[\'manifest\'] = Array('.file_get_contents($component['manifest_file']).');'); 48 49 36 50 if ( !is_array($component['manifest']) 37 51 || count($component['manifest']) == 0) 38 52 { 53 return -1; 39 54 die("Component manifest {$component['manifest_file']} is broken.\n"); 40 55 } 41 42 56 43 57 eval('$component[\'manifest\'] = Array('.file_get_contents($component['manifest_file']).');'); trunk/support/findComponents.sh
r2732 r2733 3 3 PHP=`which php` 4 4 5 5 6 find ../ -name "manifest.inc" > "./manifests.tmp" 6 $PHP ./checkManifest.php ./manifests.tmp 7 8 output=`$PHP ./checkManifest.php ./manifests.tmp 0` 9 10 if [ $? != 0 ];then 11 echo "Error in manifestfile. Exiting!\n" 12 echo "$output "; 13 exit 1 14 fi 15 16 17 $PHP ./checkManifest.php ./manifests.tmp 0 7 18 rm -f "./manifests.tmp" 8 19 trunk/support/makedist2.sh
r2731 r2733 6 6 # Note: your PEAR must be patched according to: 7 7 # http://bergie.iki.fi/midcom-permalink-d6068a9ddfb168af1aae6d5f61579dc3 8 PEAR="/sw/bin/pear"9 #PEAR=`which pear`8 #PEAR="/sw/bin/pear" 9 PEAR=`which pear` 10 10 PHP=`which php` 11 echo "Using PEAR fund here: $PEAR" 12 echo "Using PHP found here: $PHP" 11 13 MIDCOM_SUPPORT_DIR=`dirname $0` 12 14 … … 29 31 de.linkm.taviewer 30 32 net.nemein.ping 31 net.nehmer.jobmarket" 33 net.nehmer.jobmarket 34 " 35 COMPONENTS=`./findComponents.sh` 36 if [ $? != 0 ];then 37 echo "$COMPONENTS "; 38 exit 1 39 fi 40 32 41 33 42 for component in $COMPONENTS; do
