Remove manual phar building scripts
authorChristian Weiske <cweiske@cweiske.de>
Wed, 12 Mar 2014 05:42:10 +0000 (06:42 +0100)
committerChristian Weiske <cweiske@cweiske.de>
Wed, 12 Mar 2014 05:42:51 +0000 (06:42 +0100)
bin/fetch-deps.php [deleted file]
bin/makephar.php [deleted file]
deps.txt [deleted file]

diff --git a/bin/fetch-deps.php b/bin/fetch-deps.php
deleted file mode 100755 (executable)
index 112a1f0..0000000
+++ /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";
-}
-?>
diff --git a/bin/makephar.php b/bin/makephar.php
deleted file mode 100755 (executable)
index 13c1acd..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/usr/bin/env php
-<?php
-if (ini_get('phar.readonly') == 1) {
-    //re-run this script with phar writing activated
-    passthru(PHP_BINARY . ' -dphar.readonly=0 ' . escapeshellarg($argv[0]));
-    exit();
-}
-
-$pharfile = __DIR__ . '/../dist/bdrem-0.1.0.phar';
-if (file_exists($pharfile)) {
-    unlink($pharfile);
-}
-$phar = new Phar($pharfile, 0, 'bdrem.phar');
-$phar->startBuffering();
-
-// add all files in the project
-$phar->buildFromDirectory(
-    realpath(__DIR__ . '/../'),
-    '#'
-    . '^' . preg_quote(realpath(__DIR__ . '/../'), '#')
-    . '/(data/bdrem.config.php.dist|lib/|src/bdrem/|www/|README\.rst)'
-    . '#'
-);
-
-//remove shebang from bin/bdrem.php
-$bin = file_get_contents(__DIR__ . '/../bin/bdrem.php');
-$phar->addFromString('bin/bdrem.php', substr($bin, strpos($bin, "\n") + 1));
-
-$phar->setStub(file_get_contents(__DIR__ . '/../src/phar-stub.php'));
-$phar->stopBuffering();
-?>
diff --git a/deps.txt b/deps.txt
deleted file mode 100644 (file)
index 083560f..0000000
--- a/deps.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-pear.php.net/Console_Color2
-pear.php.net/Console_CommandLine
-pear.php.net/Console_Table
-pear.php.net/Mail_mime