When running ./drupal_audit.sh from my Drupal root on OSX, this apparently doesn't work:
THEMEPATH=$(drush $SITE_ALIAS php-eval "echo drupal_get_path('theme', '$i');")
So when it gets here:
COUNT=$(grep -r function $THEMEPATH | wc -l)
I end up with "grep: warning: recursive search of stdin" and the script hangs. Everything up to that point works fine. This is the last item in the log:
----------------------------------------
Themes status
----------------------------------------
# Theme: panopoly_theme
Templates count: 0
Obviously, template count failed due to the same path issue, hence 0 results.