Avoid noise from python bytecompile on non-python pkgs (RhBug:539635)
[platform/upstream/rpm.git] / scripts / find-provides.php
1 #!/bin/sh
2 if [ $# -lt 1 ]; then
3         echo "You have to specify input file"
4         exit 1
5 fi
6
7 filelist=`echo $@`
8 for i in $filelist; do
9         i=`echo $i | grep "\.php$"`
10         if [ -n "$i" ]; then
11                 j=`cat $i |egrep  -i "^Class" |cut -f 2 -d " "| tr -d "\r"`
12                 if [ -n "$j" ]; then
13                         for p in $j; do
14                                 echo "pear($p)"
15                         done
16                         j=""
17                 fi
18         fi
19 done