Created
March 29, 2017 08:29
-
-
Save jnous/da58bea83674e1ba9a7278900e31e08b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# For Drupal 8 configuration management. | |
# Strips UUIDs out of configuration YAMLs so that they can be used on any site. | |
# First parameter should be the directory in which to look for the files. | |
for f in $(find "${1}" -type f) | |
do | |
if [[ $(basename "${f}") != "system.site.yml" ]] | |
then | |
perl -pi -e '$_ = "" if ( $. == 1 && $_ =~ /^uuid.*$/ );' "${f}" | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment