diff options
Diffstat (limited to 'scripts/find-provides.php')
-rwxr-xr-x | scripts/find-provides.php | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/scripts/find-provides.php b/scripts/find-provides.php new file mode 100755 index 000000000..11178bf37 --- /dev/null +++ b/scripts/find-provides.php @@ -0,0 +1,19 @@ +#!/bin/sh +if [ $# -lt 1 ]; then + echo "You have to specify input file" + exit 1 +fi + +filelist=`echo $@` +for i in $filelist; do + i=`echo $i | grep "\.php$"` + if [ -n "$i" ]; then + j=`cat $i |egrep -i "^Class" |cut -f 2 -d " "| tr -d "\r"` + if [ -n "$j" ]; then + for p in $j; do + echo "pear($p)" + done + j="" + fi + fi +done |