Skip to content

Instantly share code, notes, and snippets.

@mariagwyn
Created March 8, 2012 23:49
Show Gist options
  • Save mariagwyn/2004192 to your computer and use it in GitHub Desktop.
Save mariagwyn/2004192 to your computer and use it in GitHub Desktop.
Remove version numbers from drupal .info files
#Script removes drupal packing script info from core module and theme info files.
# run on older version of drupal, BEFORE applying patches.
# This does not remove Acquia Drupal packing information.
#
# must: chmod +x ~/rmv_version_nums.shn (makes executable)
#
# - @mariagwyn with the help of greggles.
sed -i '' 's/; Information added by drupal.org packaging script on [0-9]*-[0-9]*-[0-9]*//g' modules/*/*.info themes/*/*.info themes/tests/*/*.info
sed -i '' 's/version = "[0-9]*.[0-9]*"//g' modules/*/*.info themes/*/*.info themes/tests/*/*.info
sed -i '' 's/project = "drupal"//g' modules/*/*.info themes/*/*.info themes/tests/*/*.info
sed -i '' 's/datestamp = "[0-9]*"//g' modules/*/*.info themes/*/*.info themes/tests/*/*.info
sed -i '' '/^$/d' modules/*/*.info themes/*/*.info themes/tests/*/*.info
echo "Version numbers removed"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment