Good initiative, i'll share mine ;)

I use one autoload array for all components and my classes, generated
by this script:

#!/bin/sh

scanPath="."
if [[ $1 != "" ]]; then
    scanPath=$1;
fi;

echo "<?php";
echo "return array(";
echo `find -L $scanPath -name "*php"  | xargs grep "^class " | sed -e
"s...@\([^:]*\):class \([^ ]*\).*@    '\2' => '\1',\
@"`;
echo `find -L $scanPath -name "*php"  | xargs grep "^abstract class "
| sed -e "s...@\([^:]*\):abstract class \([^ ]*\).*@    '\2' => '\1',\
@"`;
echo `find -L $scanPath -name "*php"  | xargs grep "^interface " | sed
-e "s...@\([^:]*\):interface \([^ ]*\).*@    '\2' => '\1',\
@"`;
echo ");";
echo "?>";

-- 
http://jamespic.com/contact
Customer is king - Le client est roi - El cliente es rei.
-- 
Components mailing list
Components@lists.ez.no
http://lists.ez.no/mailman/listinfo/components

Reply via email to