basic source dirs && general tarball fixup
[pharext/pharext] / src / pharext / Task / PeclFixup.php
index b237771055c51cf344d9397caa26591c0cf5ea56..33eb889c7900744e5350862a271f83cb26b6df29 100644 (file)
@@ -33,8 +33,11 @@ class PeclFixup implements Task
                }
                $dirs = glob("{$this->source}/*", GLOB_ONLYDIR);
                $files = array_diff(glob("{$this->source}/*"), $dirs);
+               $check = array_reduce($files, function($r, $v) {
+                       return $v && fnmatch("package*.xml", basename($v));
+               }, true);
 
-               if (count($dirs) !== 1 || !count($files)) {
+               if (count($dirs) !== 1 || !$check) {
                        throw new Exception("Does not look like an extracted PECL dir: {$this->source}");
                }