Skip to content

Instantly share code, notes, and snippets.

@nsagot
Created August 7, 2018 13:08
Show Gist options
  • Select an option

  • Save nsagot/9c8af3cfdbc897ccaaf3a15e60a0f0ef to your computer and use it in GitHub Desktop.

Select an option

Save nsagot/9c8af3cfdbc897ccaaf3a15e60a0f0ef to your computer and use it in GitHub Desktop.
Extract diff from Hacked! for Drupal Modules
#!/usr/bin/env bash
DRUSH="vendor/bin/drush"
$DRUSH hlp > /tmp/hlp.list
MODULE_LIST=$(cat /tmp/hlp.list | sed 's/ \+ /\t/g' | cut -f 2)
for f in $MODULE_LIST ; do \
$DRUSH hacked-diff $f > /tmp/$f.patch ; \
done
rm /tmp/hlp.list
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment