forked from hypothesis/h
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bootstrap
executable file
·87 lines (71 loc) · 2 KB
/
bootstrap
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
#!/bin/bash -e
function create_virtualenv() {
echo "Creating virtualenv...";
virtualenv --no-site-packages --distribute .;
source bin/activate;
}
function maybe_create_virtualenv() {
echo "
This script can create an isolated environment for installing python
software libraries needed for development. This setup is recommended.
If you are not familiar with using virtualenv [1] to manage a python
development environment you may wish to take a few minutes to read a
bit about it.
If you are comfortable managing it yourself, e.g. through a tool
like virtualenv-wrapper [2], you may decline to create one now.
[1] http://www.virtualenv.org/
[2] http://virtualenvwrapper.readthedocs.org/
"
if [ -t 0 ]; then
while true; do
read -p "Create a virtualenv now (recommended)? " yn
case $yn in
[Yy]* )
create_virtualenv
break;;
[Nn]* ) break;;
* ) echo "Please answer yes or no.";;
esac
done
else
create_virtualenv
fi
}
if test -z "$VIRTUAL_ENV"; then
if test ! -e bin/activate; then
maybe_create_virtualenv
else
source bin/activate
fi
fi
if test -z "$PIP_DOWNLOAD_CACHE"; then
export PIP_DOWNLOAD_CACHE=.pip
fi
echo "Ensuring an up-to-date pip..."
pip install --use-mirrors -qU pip
echo "Checking dependencies..."
diff -q requirements.txt .installed.txt 2> /dev/null || {
echo "Installing dependencies (this may take a few minutes)..."
pip install --use-mirrors -qr requirements.txt
cp requirements.txt .installed.txt
}
echo -n "Checking for Compass..."
command -v compass || echo "...not found!"
echo -n "Checking for CoffeeScript..."
command -v coffee || echo "...not found!"
echo -n "Checking for CleanCSS..."
command -v cleancss || {
echo "...not found!"
echo
echo "CleanCSS was not found. You MUST run in debug mode."
echo "The development configuration does this."
echo
}
echo -n "Checking for UglifyJS..."
command -v uglifyjs || {
echo "...not found!"
echo
echo "UglifyJS was not found. You MUST run in debug mode."
echo "The development configuration does this."
echo
}