-#!/bin/sh
-if [ $# -lt 1 ]; then
- echo "You have to specify input file"
- exit 1
-fi
+#!/usr/bin/perl
+#####################################################################
+# #
+# Check system dependences between php-pear modules #
+# #
+# Pawe³ Go³aszewski <blues@ds.pg.gda.pl> #
+# Micha³ Moskal <malekith@pld-linux.org> #
+# ------------------------------------------------------------------#
+# TODO: #
+#####################################################################
-filelist=`echo $@`
-for i in $filelist; do
- j=`cat $i |egrep -i "^Class" |cut -f 2 -d " "`
- if [ -n "$j" ]; then
- echo "Provides: pear($j)"
- fi
- j=""
-done
+$pear = "/usr/share/pear";
+
+foreach (@ARGV ? @ARGV : <>) {
+ chomp;
+ $f = $_;
+ next unless ($f =~ /$pear.*\.php$/);
+ $f =~ s/.*$pear\///;
+ print "pear($f)\n";
+}