]> git.pld-linux.org Git - packages/php-pear.git/commitdiff
- scan PEAR channel name from .reg file
authorElan Ruusamäe <glen@pld-linux.org>
Wed, 10 Mar 2010 12:47:29 +0000 (12:47 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    php-channel-prov.php -> 1.1

php-channel-prov.php [new file with mode: 0644]

diff --git a/php-channel-prov.php b/php-channel-prov.php
new file mode 100644 (file)
index 0000000..505e7f9
--- /dev/null
@@ -0,0 +1,20 @@
+#!/usr/bin/php
+<?php
+# Scan files from .channels dir ending with .reg extension for PEAR channel info
+# Author: Elan Ruusamäe <glen@pld-linux.org>
+#
+# Date: 2010-03-10
+# $Id$
+
+if ($argc > 1) {
+    $files = array_splice($argv, 1);
+} else {
+    $files = explode(PHP_EOL, trim(file_get_contents('php://stdin')));
+}
+
+foreach ($files as $file) {
+       if (strstr($file, '.channels') && substr($file, -4) == '.reg') {
+               $reg = unserialize(file_get_contents($file));
+               printf("Provides: php-channel(%s)\n", $reg['name']);
+       }
+}
This page took 0.100682 seconds and 4 git commands to generate.