makinacorpus / drupal_audit

Drupal Audit
43 stars 7 forks source link

$THEMEPATH fails on OSX resulting in grep of stdin #8

Open seanr opened 11 years ago

seanr commented 11 years ago

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.

simongeorges commented 11 years ago

I've raised the issue to a friend with OSX, let's see what comes of it. Thanks for the report!

SebCorbin commented 11 years ago

panopoly_theme is a module, how come it detects it as a theme?

simongeorges commented 11 years ago

Oh... it seems the "drush pml | grep Theme" is not case sensitive...

seanr commented 11 years ago

That's very strange, because even the OSX docs state that grep is case sensitive by default and it doesn't look like you're using the -i flag.

simongeorges commented 11 years ago

Are you sure you don't have an alias on "grep -i" for grep defined somewhere? Can you perform some tests by directly using the commands "drush pml | grep Theme" && "drush pml | grep theme" on your system ?