/[smeserver]/rpms/php-pear-Log/sme8/xml2changelog
ViewVC logotype

Annotation of /rpms/php-pear-Log/sme8/xml2changelog

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (hide annotations) (download)
Tue Sep 20 13:58:50 2011 UTC (12 years, 8 months ago) by slords
Branch: MAIN
CVS Tags: php-pear-Log-1_11_6-1_el5_sme, php-pear-Log-1_11_6-1_el5_sme_1
Changes since 1.1: +9 -3 lines
Import newer package

1 slords 1.1 <?php
2     $prog=array_shift($_SERVER['argv']);
3     if ($_SERVER['argc']<2) die ("usage : " . $prog . " path_to_package.xml [ --debug ]\n");
4     $file=array_shift($_SERVER['argv']);
5    
6     ($xml=simplexml_load_file($file)) || die ($file . " not found !\n");
7     if (in_array("--debug", $_SERVER['argv'])) print_r($xml);
8    
9     if ($xml['version'] >= "2"){ // Package.xml V 2.0
10 slords 1.2 printf("*** Version %s (%s) - API %s (%s) - %s\n\n%s\n\n",
11 slords 1.1 $xml->version->release, $xml->stability->release,
12     $xml->version->api, $xml->stability->api,
13     $xml->date, $xml->notes);
14 slords 1.2 $new=$xml->version->release;
15 slords 1.1
16 slords 1.2 if (isset($xml->changelog->release) && count($xml->changelog->release))
17     foreach($xml->changelog->release as $rel) {
18     $old=$rel->version->release;
19     if ("$old" != "$new") {
20     printf("*** Version %s (%s) - API %s (%s) - %s\n\n%s\n\n",
21 slords 1.1 $rel->version->release, $rel->stability->release,
22     $rel->version->api, $rel->stability->api,
23     $rel->date, $rel->notes);
24 slords 1.2 }
25     }
26 slords 1.1 } else { // Package.xml V 1.0
27     printf("* Version %s (%s) - %s\n\n%s\n\n",
28     $xml->release->version, $xml->release->state, $xml->release->date, $xml->release->notes);
29    
30     foreach($xml->changelog->release as $rel)
31     printf("* Version %s (%s) - %s\n\n%s\n\n",
32     $rel->version, $rel->state, $rel->date, $rel->notes);
33     }
34     ?>

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed