Skip to content

Instantly share code, notes, and snippets.

@vincenzo
Created January 12, 2013 23:30
Show Gist options
  • Save vincenzo/4521015 to your computer and use it in GitHub Desktop.
Save vincenzo/4521015 to your computer and use it in GitHub Desktop.
Ok, Drupal. Imagine that, for whatever reason, you have a profile with a number of dependencies and you have to make sure you have all the modules in your codebase that match those dependencies. Here is a possible bash command to list modules that are not found. Fairly sure one can do better, but this was written on the fly and worked. Gotta lov…
cat yourprofile.info | grep "dependencies\[]" | cut -d "=" -f 2 | while read MODULE; do echo "${MODULE}: $(find /var/www/yoursite -iname ${MODULE}.module | wc -l)"; done | sort | grep ": 0" | cut -d ":" -f 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment