2 #####################################################################
4 # Check system dependences between php-pear modules #
6 # Pawe³ Go³aszewski <blues@ds.pg.gda.pl> #
7 # ------------------------------------------------------------------#
9 # - extension_loaded - dependencies. #
10 # - some clean-up... #
11 #####################################################################
13 echo "You have to specify input file"
17 for files in `echo $@`; do
18 files=`echo $files | grep "\.php$"`
19 if [ -n "$files" ]; then
20 # Requires trough new call:
21 j=`cat $files | grep -i new | egrep "(=|return)" | egrep -v "^[[:space:]*]*(\/\/|#|\*|/\*)" | tr -d "\r" | egrep "[;|(|)|{|}|,][[:space:]*]*$" | awk -F "new " '{ print $2 }' | sed "s/[(|;|.]/ /g" | cut -f 1 -d " " | sed "s/^$.*//"`
28 # requires trough class extension
29 k=`cat $files | egrep -i "(^Class.*extends)" | awk -F " extends " '{ print $2 }' | sed "s/{.*/ /" | cut -f 1 -d " " | tr -d "\r"`
36 # requires trough class:: call
37 l=`cat $files | grep "::" | egrep -v "^[[:space:]*]*(\/\/|#|\*|/\*)" | sed "s/[(|'|!|\"|&|@|;]/ /g" | awk -F "::" '{ print $1 }' | sed "s/.*\ \([:alphanum:]*\)/\1/" | sed "s/^$.*//" | sed "s/[.]//g" | tr -d "\r"`