diff options
| author | Christian Weiske <cweiske@cweiske.de> | 2014-03-12 06:42:10 +0100 |
|---|---|---|
| committer | Christian Weiske <cweiske@cweiske.de> | 2014-03-12 06:42:51 +0100 |
| commit | de289237fb227b373274fc6a029cddfbed9f802a (patch) | |
| tree | bcb944bfed58319a0c126bfdde77ab115ca17b14 /bin/fetch-deps.php | |
| parent | 6d93322bd314ffe59bdd12e525c7511e43037dfd (diff) | |
| download | bdrem-de289237fb227b373274fc6a029cddfbed9f802a.tar.gz bdrem-de289237fb227b373274fc6a029cddfbed9f802a.zip | |
Remove manual phar building scripts
Diffstat (limited to 'bin/fetch-deps.php')
| -rwxr-xr-x | bin/fetch-deps.php | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/bin/fetch-deps.php b/bin/fetch-deps.php deleted file mode 100755 index 112a1f0..0000000 --- a/bin/fetch-deps.php +++ /dev/null @@ -1,45 +0,0 @@ -#!/usr/bin/env php -<?php -/** - * reads pear package dependencies from deps.txt and copies them into lib/ - */ -$deps = file(__DIR__ . '/../deps.txt'); -$libdir = __DIR__ . '/../lib/'; - -error_reporting(error_reporting() & ~E_STRICT & ~E_DEPRECATED); -require_once 'PEAR/Registry.php'; -$reg = new PEAR_Registry(); - -foreach ($deps as $dep) { - $dep = trim($dep); - list($channel, $pkgname) = explode('/', $dep); - $pkginfo = $reg->packageInfo($pkgname, null, $channel); - if ($pkginfo === null) { - echo 'Package not found: ' . $dep . "\n"; - exit(1); - } - - echo "Copying " . $channel . '/' . $pkgname . "\n"; - $files = 0; - foreach ($pkginfo['filelist'] as $fileinfo) { - if ($fileinfo['role'] != 'php') { - continue; - } - - $orig = $fileinfo['installed_as']; - $path = $libdir . ltrim( - $fileinfo['baseinstalldir'] . '/' . $fileinfo['name'], '/' - ); - $dir = dirname($path); - if (!is_dir($dir)) { - mkdir($dir, 0777, true); - } - if (!copy($orig, $path)) { - echo " Error copying $orig to $path\n"; - exit(2); - } - ++$files; - } - echo " copied $files files\n"; -} -?> |
