handle opcache as zend_extension
[m6w6/pecl-ci] / php-version-url-dist.php
index f44e178b6b8179f800da60604e616d1b19151bf1..f0e487d9ddccdc81a1dc6577182d548fe6522a24 100755 (executable)
@@ -1,9 +1,15 @@
 #!/usr/bin/env php
 <?php
 
+
 $versions = @json_decode(stream_get_contents(STDIN), 1);
 $mirror = getenv("PHP_MIRROR");
 
+
+
+
+
+
 $by_minor = array();
 # build the tree of latest versions per minor
 if (!empty($versions) && !isset($versions["error"])) {
@@ -19,5 +25,10 @@ if (!empty($versions) && !isset($versions["error"])) {
 }
 
 foreach ($by_minor as $v => $r) {
-       printf("%s\t%s\tcurl -sS %s%s | tar xj\n", $v, $r, $mirror, $versions[$r]["source"][0]["filename"]);
+       $compress = array("gz" => "z", "bz2" => "j", "xz" => "J");
+       $filename = $versions[$r]["source"][0]["filename"];
+       printf("%s\t%s\tcurl -sSL %s%s | tar x%s\n", $v, $r, $mirror,
+                       $filename,
+                       $compress[pathinfo($filename, PATHINFO_EXTENSION)]
+               );
 }