-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall
executable file
·88 lines (69 loc) · 1.54 KB
/
install
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
#!/bin/bash
set -e
cd "${0%/*}"
ALREADY_INSTALLED=$(cat <<EOF
Already installed. Consider \`./bin/uninstall\` and trying again if you
are experiencing issues.
EOF
)
cd ..
if test ! -e .installed
then
git submodule update --init --recursive
pushd docker/python/requirements
pushd django
ln -f ../../../../requirements/base.txt
ln -f ../../../../requirements/database.txt
ln -f ../../../../requirements/webserver.txt
popd
pushd celery
ln -f ../../../../requirements/base.txt
ln -f ../../../../requirements/database.txt
popd
pushd test
ln -f ../../../../requirements/base.txt
ln -f ../../../../requirements/database.txt
ln -f ../../../../requirements/test.txt
popd
popd
pushd docker/lint
ln -f ../../requirements/lint.txt
popd
if test ! -e .envrc
then
cp example.envrc .envrc
$EDITOR .envrc
if command -v direnv > /dev/null 2>&1
then
direnv allow
fi
source .envrc
fi
./bin/cert-update
if test ! -e .built
then
$DOCKER_COMPOSE --profile test build
touch .built
fi
if test ! -e .completions-generated
then
./bin/completions-regenerate
touch .completions-generated
fi
if test ! -e .migrated
then
if ./bin/manage wait_for_db
then
./bin/schema-create
./bin/manage migrate
else
echo 'Database failed to respond, please inspect `$DOCKER_COMPOSE ps`.'
fi
touch .migrated
fi
./bin/manage collectstatic --noinput
rm .built .completions-generated .migrated
touch .installed
else
echo "$ALREADY_INSTALLED"
fi