fix issue caused by removing download link in
[pharext/replicator.pharext.org] / bin / pecl+sig
index c1c54438364846bf71de04e1113f2d93ac16bb9c..e615e5bf2b8d5c55bc072efd809a3a9fc6bd5bae 100755 (executable)
@@ -72,9 +72,8 @@ function work($url, $dir) {
 
 if (($sxe = simplexml_load_file("https://pecl.php.net/feeds/$what.rss"))) {
        foreach ($sxe->item as $item) {
-               $url = str_replace("http://", "https://", (string) $item->link);
-               $pkg = basename(dirname($url));
-               $ver = basename($url);
+               list($pkg, $ver) = explode(" ", (string) $item->title);
+               $url = sprintf("https://pecl.php.net/get/%s/%s", $pkg, $ver);
                $skp = sprintf("%s/../skip/%s/%s", __DIR__, $pkg, $ver);
                $ext = sprintf("%s/../public/phars/%s/%s-%s.ext.phar", __DIR__, $pkg, $pkg, $ver);
                $dir = dirname($ext);