Skip to content

Instantly share code, notes, and snippets.

@thom8
Last active February 21, 2016 21:48
Show Gist options
  • Save thom8/8edc943772eb8c6f5edb to your computer and use it in GitHub Desktop.
Save thom8/8edc943772eb8c6f5edb to your computer and use it in GitHub Desktop.
#!/bin/bash -e
DVM_CONFIG=${1:-'config.yml'}
if [ ! -f "$DVM_CONFIG" ]; then
echo "Drupal VM config file not found."
exit 1
else
# Remap Drupal VM config variables.
sed -i"" "s/vagrant_hostname/beet_domain/" $DVM_CONFIG
sed -i"" "s/drupal_core_path/beet_root/" $DVM_CONFIG
sed -i"" "s/drupalvm_webserver/beet_webserver/" $DVM_CONFIG
sed -i"" "s/build_makefile/drupal_build_makefile/" $DVM_CONFIG
sed -i"" "s/drush_makefile_path/drupal_makefile_path/" $DVM_CONFIG
sed -i"" "s/install_site/drupal_install_site/" $DVM_CONFIG
sed -i"" "s/drupal_site_name/beet_site_name/" $DVM_CONFIG
sed -i"" "s/drupal_mysql_user/beet_mysql_user/" $DVM_CONFIG
sed -i"" "s/drupal_mysql_password/beet_mysql_password/" $DVM_CONFIG
sed -i"" "s/drupal_mysql_database/beet_mysql_database/" $DVM_CONFIG
#sed -i"" "s/mysql_root_password: root/mysql_root_password: ''/" $DVM_CONFIG
# disable varnish.
sed -i"" "s/ - varnish/#- varnish/" $DVM_CONFIG
fi
echo "Drupal VM config file remapped."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment