예제 #1
0
/** update PECL sources */
function update_pecl_sources()
{
    `cvs -q -d :pserver:cvsread@cvs.php.net:/repository co -P pecl > /dev/null`;
    foreach (get_pecl_packages() as $pkg) {
        $releases = get_pecl_releases($pkg);
        foreach ($releases as $ver) {
            echo "fetching PECL package: {$pkg}-{$ver}... ";
            grab_pecl_release($pkg, $ver);
        }
    }
}
예제 #2
0
파일: functable.php 프로젝트: guoyu07/NYAF
         fwrite(STDERR, "Fetching releases for: {$pkg}\n");
         if ($peclReleases = get_pecl_releases($pkg)) {
             foreach ($peclReleases as $ver) {
                 if (!isset($releases[$pkg])) {
                     $releases[$pkg] = array();
                 }
                 $releases[$pkg][] = $ver;
             }
         }
     }
 }
 foreach ($releases as $pkg => $versions) {
     foreach ($versions as $ver) {
         $pkgName = $pkg . '-' . $ver;
         fwrite(STDERR, "Grabbing PECL Release: " . $pkgName . "\n");
         grab_pecl_release($pkg, $ver);
         fwrite(STDERR, "Parsing protos ...\n");
         // sometimes PECL package name case is broken:
         $dirName = false;
         if (is_dir(PATH_TMP . DIRECTORY_SEPARATOR . $pkgName)) {
             $dirName = PATH_TMP . DIRECTORY_SEPARATOR . $pkgName;
         } elseif (is_dir(PATH_TMP . DIRECTORY_SEPARATOR . strtolower($pkgName))) {
             $dirName = PATH_TMP . DIRECTORY_SEPARATOR . strtolower($pkgName);
         } elseif (is_dir(PATH_TMP . DIRECTORY_SEPARATOR . strtoupper($pkgName))) {
             $dirName = PATH_TMP . DIRECTORY_SEPARATOR . strtoupper($pkgName);
         } else {
             fwrite(STDERR, "ERROR: unable to determine package directory.\n");
         }
         if ($dirName) {
             $protos = parse_protos($dirName);
             fwrite(STDERR, "Storing protos ...\n");