3
0
Fork 0
mirror of https://github.com/farmOS/farmOS.git synced 2024-02-23 11:37:38 +01:00

Build dev codebase even if /var/farmOS/build-farm.make exists. Run a 'git pull' on it first, if it does.

This commit is contained in:
Michael Stenta 2016-10-17 13:32:39 -04:00
parent 1f29d59bd4
commit 70a7fcc1c9

View file

@ -1,12 +1,17 @@
#!/bin/bash
set -e
# If we are building a development environment, and the farmOS codebase does
# not exist, build it.
if $FARMOS_DEV && [ ! -e /var/farmOS/build-farm.make ]; then
# Build a development environment, if desired.
if $FARMOS_DEV; then
# Clone the farmOS installation profile.
git clone --branch $FARMOS_DEV_BRANCH https://git.drupal.org/project/farm.git /var/farmOS
# Clone the farmOS installation profile, if it doesn't already exist.
if ! [ -e /var/farmOS/build-farm.make ]; then
git clone --branch $FARMOS_DEV_BRANCH https://git.drupal.org/project/farm.git /var/farmOS
# Update it if it does exist.
else
git -C /var/farmOS pull origin $FARMOS_DEV_BRANCH
fi
# If the sites folder exists, preserve it by temporarily moving it up one dir.
if [ -e /var/www/html/sites ]; then