Skip to content

Instantly share code, notes, and snippets.

@kerasai
Created August 23, 2018 14:21
Show Gist options
  • Save kerasai/469f03f0e19ffd23f78fd79974f9cb8e to your computer and use it in GitHub Desktop.
Save kerasai/469f03f0e19ffd23f78fd79974f9cb8e to your computer and use it in GitHub Desktop.
Renames Drupal content type configuration
# rename files & strip uuids
for f in *.yml; do mv "$f" "$(echo "$f" | sed s/node.experience/node.event/)"; done
for f in *.yml; do sed -i '' -e '/^uuid: /d' "$f"; done
# search/replace contents
for f in *.yml; do sed -i '' -e 's/node\.experience/node\.event/' "$f"; done
for f in *.yml; do sed -i '' -e 's/node\.type\.experience/node\.type\.event/' "$f"; done
for f in *.yml; do sed -i '' -e 's/bundle: experience/bundle: event/' "$f"; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment