forked from fispace-git/wstore
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.sh
executable file
·50 lines (40 loc) · 830 Bytes
/
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
48
49
50
#!/bin/bash
set -e
# Define variables used in all scripts if not already set
if [[ -z "$WORKSPACE" ]]
then
export WORKSPACE=`pwd`
fi
if [[ -z "$PIP_DOWNLOAD_CACHE" ]]
then
export PIP_DOWNLOAD_CACHE=~/.pip_cache
fi
# Activate Virtualenv
cd $WORKSPACE/src
# Check if virtualenv is installed
set +e
hash virtualenv-2.7 &> /dev/null
VIRT27=true
if [ $? -eq 1 ]; then
VIRT27=false
fi
set -e
if [ !$VIRT27 ]; then
virtualenv virtenv
else
virtualenv-2.7 virtenv
fi
source virtenv/bin/activate
$WORKSPACE/python-dep-install.sh
# Create project directories
cd $WORKSPACE/src
mkdir -p media/{bills,resources}
mkdir -p wstore/search/indexes
mkdir -p wstore/social/indexes
# Test installation
$WORKSPACE/coverage.sh
# Configure installation
if [[ "$1" != "--noinput" ]]
then
$WORKSPACE/configure.sh
fi