forked from mozilla-services/socorro
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bootstrap.sh
executable file
·58 lines (47 loc) · 1.45 KB
/
bootstrap.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
48
49
50
51
52
53
54
55
56
57
58
#! /bin/bash -ex
echo "this is bootstrap.sh"
source scripts/defaults
git submodule update --init --recursive
if [ ! -d "$VIRTUAL_ENV" ]; then
virtualenv -p $PYTHON ${VIRTUAL_ENV}
fi
source "$VIRTUAL_ENV/bin/activate"
# install dev + prod dependencies
${VIRTUAL_ENV}/bin/python tools/pipstrap.py
${VIRTUAL_ENV}/bin/pip install --require-hashes -r requirements.txt
if [ -n "${SOCORRO_DEVELOPMENT_ENV+1}" ]; then
# install development egg in local virtualenv
${VIRTUAL_ENV}/bin/python setup.py develop
fi
if [ "`uname -sm`" == "Linux x86_64" ]; then
# pull pre-built, known version of breakpad
wget -N --quiet 'https://index.taskcluster.net/v1/task/project.socorro.breakpad.v1.builds.linux64.latest/artifacts/public/breakpad.tar.gz'
tar -zxf breakpad.tar.gz
rm -rf stackwalk
mv breakpad stackwalk
else
# build breakpad from source
make breakpad
fi
# Build JSON stackwalker and friends
pushd minidump-stackwalk
make
popd
cp minidump-stackwalk/stackwalker stackwalk/bin
cp minidump-stackwalk/jit-crash-categorize stackwalk/bin
cp minidump-stackwalk/dumplookup stackwalk/bin
# setup any unset test configs and databases without overwriting existing files
pushd config
for file in *.ini-dist; do
if [ ! -f `basename $file -dist` ]; then
cp $file `basename $file -dist`
fi
done
popd
# bootstrap webapp
OLD_PYTHONPATH=$PYTHONPATH
export PYTHONPATH=$(pwd):$PYTHONPATH
pushd webapp-django
./bin/bootstrap.sh
export PYTHONPATH=$OLD_PYTHONPATH
popd