-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrequirements.sh
74 lines (47 loc) · 2.12 KB
/
requirements.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
59
60
61
62
63
64
65
66
67
68
69
70
#!/usr/bin/env bash
#####################
# Requirements file #
#####################
# Butterfly Devs @ Granada 2017
# You can run directly this file (. ./requirements.sh) in the root dir of the project or using our preferred
# tool of automation, Fabric (http://www.fabfile.org/ - apt-get install fabric) run:
echo -e "\033[35m \n\t ### IVChecker BackEnd Project \033[35m ### \033[0m"
echo -e "\033[34m \t Butterfly Devs @ Granada 2017 \033[34m \033[0m"
echo -e "\033[35m \n\t Thank you for your contribution! \n \033[0m"
echo -e "It will be installed: UnZIP, Curl, Google App Engine SDK v.1.9.50 , pytest and python requirements for GAE app. \n"
read -p "Are you sure? [y/n]: " -n 1 -r
echo # (optional) move to a new line
if [[ $REPLY =~ ^[Yy]$ ]]
then
echo -e "\n\033[34m 1. Installing unzip \033[0m\n"
sudo apt-get install -y unzip
echo -e "\n\033[34m 2. Installing curl \033[0m\n"
sudo apt-get install -y curl
# Control will enter here if google_appengine directory doesn't exist.
if [ ! -d "google_appengine" ];
then
# Version of 23 January 2017 (In other projects we used 1.9.30)
echo -e "\n\033[34m 3. Downloading Google App Engine SDK v.1.9.50 \033[0m\n"
curl -O https://storage.googleapis.com/appengine-sdks/featured/google_appengine_1.9.50.zip
echo -e "\n\033[34m 4. Unzip SDK \033[0m\n"
unzip google_appengine_1.9.50.zip
echo -e "\n\033[34m 5. Deleting .zip \033[0m\n"
rm google_appengine_1.9.50.zip
fi
echo -e "\n\033[34m 6. Installing Python pip \033[0m\n"
sudo apt-get install python-pip
echo 'Version of pip installed:'
pip --version
echo -e "\n\033[34m Upgrading pip \033[0m\n"
pip install --upgrade pip
echo 'Version of pip updated:'
pip --version
echo -e "\n\033[34m 7. Installing pytest \033[0m\n"
sudo pip install -U pytest
pytest --version
echo -e "\n\033[34m 8. Installing GAE python dependencies from requirements.txt \033[0m\n"
sudo pip install -r requirements.txt -t lib/
echo -e "\n\033[34m Done! \033[0m\n"
else
echo -e "\n\033[34m :( \033[0m\n"
fi