#!/usr/bin/php "1.5.1", "Console_Getopt" => "1.2.1", "Archive_Tar" => "1.3.2", "Structures_Graph" => "1.0.2", // required packages for the web frontend "PEAR_Frontend_Web" => "0.5.1", "HTML_Template_IT" => "1.1.4", "Net_UserAgent_Detect" => "2.0.1", ); /* download the packages into the destination */ echo "Fetching packages\n"; foreach ($packages as $name => $version) { $filename = "$name-$version.tgz"; $destfilename = "$dist_dir/PEAR/go-pear-bundle/$filename"; if (file_exists($destfilename)) continue; $url = "http://pear.php.net/get/$filename"; echo "Downloading $name from $url\n"; flush(); copy($url, $destfilename); } echo "Download complete. Extracting bootstrap files\n"; /* Now, we want PEAR.php, Getopt.php (Console_Getopt) and Tar.php (Archive_Tar) * broken out of the tarballs */ extract_file_from_tarball('PEAR', 'PEAR.php', "$dist_dir/PEAR/go-pear-bundle"); extract_file_from_tarball('Archive_Tar', 'Archive/Tar.php', "$dist_dir/PEAR/go-pear-bundle"); extract_file_from_tarball('Console_Getopt', 'Console/Getopt.php', "$dist_dir/PEAR/go-pear-bundle"); extract_file_from_tarball('Structures_Graph', 'Structures/Graph.php', "$dist_dir/PEAR/go-pear-bundle"); extract_file_from_tarball('Structures_Graph', 'Structures/Graph/Node.php', "$dist_dir/PEAR/go-pear-bundle"); extract_file_from_tarball('Structures_Graph', 'Structures/Graph/Manipulator/AcyclicTest.php', "$dist_dir/PEAR/go-pear-bundle"); extract_file_from_tarball('Structures_Graph', 'Structures/Graph/Manipulator/TopologicalSorter.php', "$dist_dir/PEAR/go-pear-bundle"); ?>