Skip to content

Instantly share code, notes, and snippets.

@doostinharrell
Created July 19, 2015 19:36
Show Gist options
  • Save doostinharrell/0f0bfcca7f537f42581c to your computer and use it in GitHub Desktop.
Save doostinharrell/0f0bfcca7f537f42581c to your computer and use it in GitHub Desktop.
drupal-npm.sh - Fixes Drupal issues with .info files inside node_modules folder
#!/bin/bash
#
# Run this shell script to resolve drupal npm issues for the project
#
# Author: Dustin Harrell - https://github.com/doostinharrell/
# Version: 1.0
#
# Resolving issues with Drupal looking at node_module info files
echo "Resolving issues with Drupal looking at node_module info files"
find -L ./node_modules -type f -name "*.info" -print0 | while IFS= read -r -d '' FNAME; do
mv -- "$FNAME" "${FNAME%.info}.inf0"
done
echo "Issues resolved"
# Clear Drupal Cache
echo "Clearing Drupal cache"
drush cc all
echo "Drupal cached cleared"
echo "script complete"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment