From: Antonio Ospite Date: Wed, 25 Oct 2017 16:28:23 +0000 (+0200) Subject: bootstrap.sh: copy settings.local.php only when it's not already there X-Git-Tag: v0.1.0~15 X-Git-Url: https://git.ao2.it/drupal-init-tools.git/commitdiff_plain/1145ee9e3e74f847da8d165b3ef6887bb15e0c7c?ds=sidebyside bootstrap.sh: copy settings.local.php only when it's not already there This is to preserve local changes in case of a re-bootstrap. --- diff --git a/libexec/bootstrap.sh b/libexec/bootstrap.sh index 279833a..7513319 100755 --- a/libexec/bootstrap.sh +++ b/libexec/bootstrap.sh @@ -163,13 +163,16 @@ then composer --working-dir=../ require drupal/devel $DRUSH --yes en devel - cp sites/example.settings.local.php sites/default/settings.local.php + if [ ! -e sites/example.settings.local.php ]; + then + cp sites/example.settings.local.php sites/default/settings.local.php - # Disable some overly permissive settings - sed -i -e "s/^\(\$settings\['rebuild_access'\]\).*$/\1 = FALSE;/g" sites/default/settings.local.php - sed -i -e "s/^\(\$settings\['skip_permissions_hardening'\]\).*$/\1 = FALSE;/g" sites/default/settings.local.php + # Disable some overly permissive settings + sed -i -e "s/^\(\$settings\['rebuild_access'\]\).*$/\1 = FALSE;/g" sites/default/settings.local.php + sed -i -e "s/^\(\$settings\['skip_permissions_hardening'\]\).*$/\1 = FALSE;/g" sites/default/settings.local.php - chmod 444 sites/default/settings.local.php + chmod 444 sites/default/settings.local.php + fi if ! grep -q "^include \$app_root . '/' . \$site_path . '/settings.local.php';" sites/default/settings.php; then