-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdepends.sh
executable file
·46 lines (37 loc) · 1011 Bytes
/
depends.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
#!/bin/bash
if [ ${0:0:1} == "/" ]; then
HERE=$(dirname $0)
else
HERE=$(dirname $(pwd)/$0)
fi
SETENV=${HERE}/setenv.sh
PACKAGES="postgresql sqlite3"
echo
echo "Installing python2.7 ..."
sudo apt-get install -qq python2.7 python2.7-dev curl
if ! curl -O http://python-distribute.org/distribute_setup.py>/dev/null
then
echo "Failed downloading from http://python-distribute.org/distribute_setup.py"
fi
sudo python2.7 distribute_setup.py>/dev/null
sudo apt-get install -qq build-essential ${PACKAGES}
echo
echo "Installing pip, virtualenv ..."
sudo easy_install-2.7 pip
sudo pip-2.7 install --quiet virtualenv
#sudo easy_install -q -U pip
#sudo easy_install -q -U virtualenv
echo "Shutdowning python ..."
killall python 2>/dev/null
echo "Installing requirements ..."
source ${SETENV} >/dev/null
for REQMT in ${LIB_DIR}/*/requirements.txt ${APP_DIR}/*/requirements.txt $CURR_DIR/requirements.txt
do
if [ -s ${REQMT} ]
then
echo " [${REQMT}]"
pip-2.7 install -r ${REQMT}
fi
done
echo
echo "Done"