lowercase pkg name for pear rest
[pharext/replicator.pharext.org] / bin / pecl+sig
index e615e5bf2b8d5c55bc072efd809a3a9fc6bd5bae..85bc2b5720c003c8dd6c56ab1c61d2b7715795de 100755 (executable)
@@ -30,6 +30,14 @@ function sign($pkg, $ext) {
        }
 }
 
+function info($pkg, $dir) {
+       $pkg = strtolower($pkg);
+       $inf = file_get_contents("https://pecl.php.net/rest/p/$pkg/info.xml");
+       if ($inf) {
+               file_put_contents("$dir/info.xml", $inf);
+       }
+}
+
 function wait(&$pids) {
        $status = null;
        switch ($pid = pcntl_wait($status)) {
@@ -84,6 +92,7 @@ if (($sxe = simplexml_load_file("https://pecl.php.net/feeds/$what.rss"))) {
                                        exit;
                                case 0:
                                        work($url, $dir);
+                                       info($pkg, $dir);
                                        exit;
                                default:
                                        $pids[$pid] = compact("url", "pkg", "ver", "skp", "ext", "dir");