-
Notifications
You must be signed in to change notification settings - Fork 6
/
prepare.sh
executable file
·67 lines (51 loc) · 1.33 KB
/
prepare.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
#!/bin/bash
usage(){
echo "Usage:"
echo -e "\t./prepare --prod (Install Production dependencies)"
echo -e "\t./prepare --dev (Install Development dependencies)"
echo ""
exit 1
}
environment=""
if [ "$1" != "" ]; then
if [ "$1" == "--prod" ];then
environment="prod"
elif [ "$1" == "--dev" ];then
environment="dev"
else
usage
fi
else
usage
fi
echo '************************************'
echo 'Installing System-Level Dependencies'
echo '************************************'
echo ''
if [ $(uname) == 'Linux' ];then
cat requirements.apt | xargs sudo apt-get install -y
sudo curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
else
xargs brew install < requirements.brew
fi
clear
echo '************************************'
echo 'Installing Python-Level Dependencies'
echo '************************************'
echo ''
if [ "$environment" == "prod" ]; then
pip3 install -r requirements.pip
else
pip3 install -r requirements-testing.pip
fi
clear
echo '************************************'
echo 'Installing Nodejs-Level Dependencies'
echo '************************************'
echo ''
if [ "$environment" == "prod" ]; then
echo -e 'No production level npm packages required\n'
else
cat requirements.npm | sudo xargs npm install -g
fi
echo 'DONE!'