- passthru(sprintf($fmt, __DIR__, $sig, $pkg, $ext));
+ foreach (["", ".gz", ".bz2"] as $typ) {
+ passthru(sprintf($fmt, __DIR__, $sig, "sign", $pkg, $ext, $typ));
+ passthru(sprintf($fmt, __DIR__, $sig, "vrfy", $pkg, $ext, $typ));
+ }
+ }
+}
+
+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);