-
Notifications
You must be signed in to change notification settings - Fork 48
/
setup.sh
executable file
·47 lines (34 loc) · 1.25 KB
/
setup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/usr/bin/env bash
# Fail if any command fails.
set -e
if [ ! -d "bakerydemo" ]; then
git clone https://github.com/wagtail/bakerydemo.git
else
echo Directory bakerydemo already exists, skipping...
fi
if [ ! -d "wagtail" ]; then
git clone https://github.com/wagtail/wagtail.git
else
echo Directory wagtail already exists, skipping...
fi
mkdir -p libs
if [ ! -d "libs/django-modelcluster" ]; then
git clone https://github.com/wagtail/django-modelcluster.git libs/django-modelcluster
else
echo Directory libs/django-modelcluster already exists, skipping...
fi
if [ ! -d "libs/Willow" ]; then
git clone https://github.com/wagtail/Willow.git libs/Willow
else
echo Directory libs/Willow already exists, skipping...
fi
# Set up bakerydemo to use the Postgres database in the sister container
if [ ! -f bakerydemo/bakerydemo/settings/local.py ]; then
echo "Creating local settings file"
cp bakerydemo/bakerydemo/settings/local.py.example bakerydemo/bakerydemo/settings/local.py
fi
# Create a blank .env file in bakerydemo to keep its settings files from complaining
if [ ! -f bakerydemo/.env ]; then
echo "Creating file for local environment variables"
echo "DJANGO_SETTINGS_MODULE=bakerydemo.settings.dev" > bakerydemo/.env
fi