Commit 6dd432f0 authored by Victor Nikulshin's avatar Victor Nikulshin
Browse files

Restore write permission on sites/default and settings.php

When Drupal is build for the second (third, etc.) time, it is necessary to restore write permission on site settings.php file, because it is removed by Drupal by default.

Otherwise Drush make command will fail to copy all files to the src/drupal/.
parent 66e08b3c
......@@ -19,6 +19,8 @@
from __future__ import unicode_literals
from datetime import datetime
import os
from fabric.api import task, roles, env, local
from fabric.colors import red, green
from fabric.contrib.console import confirm
......@@ -63,6 +65,12 @@ def make(action='install'):
local('mkdir {}'.format(env.site_root))
with h.fab_cd('local', env.site_root):
if os.path.isdir('{}/sites/default/'.format(env.site_root)):
local('chmod u+w sites/default')
if os.path.isfile('{}/sites/default/settings.php'.format(env.site_root)):
local('chmod u+w sites/default/settings.php')
local('drush make {} {} -y'.format(drush_opts, env.makefile))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment