aboutsummaryrefslogtreecommitdiff
path: root/templater
diff options
context:
space:
mode:
Diffstat (limited to 'templater')
-rwxr-xr-xtemplater22
1 files changed, 21 insertions, 1 deletions
diff --git a/templater b/templater
index 72d4b07..6f89909 100755
--- a/templater
+++ b/templater
@@ -321,9 +321,29 @@ function templater_drupal7 {
# Drupal8 implementation
function templater_drupal8 {
- if [ ! -e 'settings.dev.php' ]; then
+ if [ ! -e 'settings.php' ]; then
__templater_echo "Setting up Drupal 8..."
+ if [ ! -e ".gitignore" ] || ! grep -q "^settings.php" .gitignore; then
+ echo settings.php >> .gitignore
+ echo settings.prod.php >> .gitignore
+ echo services.yml >> .gitignore
+ fi
+
+ if [ ! -e "settings.dev.php" ]; then
+ cp $DIRNAME/share/drupal8/default.settings.php settings.dev.php
+ cp $DIRNAME/share/drupal8/default.settings.php .
+ fi
+
+ ln -sf settings.dev.php settings.php
+
+ if [ ! -e "services.yml" ]; then
+ cp $DIRNAME/share/drupal8/default.services.yml services.dev.yml
+ cp $DIRNAME/share/drupal8/default.services.yml .
+ fi
+
+ ln -sf services.dev.yml services.yml
+
if [ ! -e "Makefile" ]; then
cp $DIRNAME/share/drupal8/Makefile .
#elif ! grep -q ^drupal: Makefile; then