Skip to content

Commit

Permalink
copy settings.ddev.php to old drupal root if it doesn't exist
Browse files Browse the repository at this point in the history
  • Loading branch information
byrond authored Jan 16, 2023
1 parent 035f000 commit 67aff19
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions targets/install.xml
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,16 @@
<!-- The one that's available is the location we're moving from. -->
<available file="${build.dir}/web/core" type="dir" property="drupal.root.old" value="web" />
<available file="${build.dir}/docroot/core" type="dir" property="drupal.root.old" value="docroot" />
<available file="${build.dir}/${drupal.root.old}/sites/default/settings.ddev.php" type="file" property="ddev_settings_exists" value="true" />

<!-- Copy settings.ddev.php if it doesn't exist in the old drupal root. -->
<if>
<not><equals arg1="${ddev_settings_exists}" arg2="1" /></not>
<then>
<echo msg="Copying settings.ddev.php to old drupal root." />
<exec command="cp ${drupal.root}/sites/default/settings.ddev.php ${drupal.root.old}/sites/default" dir="${build.dir}" checkreturn="true" logoutput="true" />
</then>
</if>

<echo msg="Moving the ${drupal.root.old}/ directory to ${drupal.root}/" />
<exec command="rm -rf ${drupal.root}" dir="${build.dir}" />
Expand Down

0 comments on commit 67aff19

Please sign in to comment.