-
Notifications
You must be signed in to change notification settings - Fork 14
/
install.sh
83 lines (71 loc) · 2.19 KB
/
install.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
71
72
73
74
75
76
77
78
79
80
81
82
83
#!/usr/bin/env bash
# Color variables
Red='\033[0;31m'
Green='\033[0;32m'
Orange='\033[0;33m'
Blue='\033[0;34m'
Purple='\033[0;35m'
Cyan='\033[0;36m'
BRed='\033[1;31m'
BGreen='\033[1;32m'
BOrange='\033[1;33m'
BBlue='\033[1;34m'
BPurple='\033[1;35m'
BCyan='\033[1;36m'
Default='\033[0m'
read -p "Do you want me to install Spnta Bot? (Y/N): "
case $REPLY in [yY])
# Install Python
echo -en "${Blue}The packages will be installed:${Default} ${NATIVE}\n${Cyan}Do you want to install the python (Y/N): ${Default}"
read REPLY
if [[ $REPLY == [yY] ]]; then
sudo add-apt-repository ppa:fkrull/deadsnakes
sudo apt-get update
sudo apt-get install python3.5
sudo apt-get install python3-pip
fi
echo -en "${Cyan}Do you want to pip packages (Y/N): ${Default}"
read REPLY
if [[ $REPLY == [yY] ]]; then
sudo pip3 install pip -U
sudo pip3 install telepot -U
sudo pip3 install aiohttp
sudo pip3 install beautifulsoup4
sudo pip3 install youtube-dl
sudo pip3 install pafy
sudo pip3 install demjson
sudo pip3 install redis
sudo pip3 install pytz
sudo pip3 install six
sudo pip3 install requests --upgrade
sudo pip3 install soundcloud
sudo pip install pytesseract
sudo pip3 install Image
sudo pip3 install telethon
fi
echo -en "${Cyan}Do you want to download the tesseract-ocr libraries (Y/N): ${Default}"
read REPLY
if [[ $REPLY == [yY] ]]; then
for ROCK in $ROCKS; do
sudo apt-get install tesseract-ocr
done
fi
echo -en "${Cyan}Do you want to download the redis libraries (Y/N): ${Default}"
read REPLY
if [[ $REPLY == [yY] ]]; then
for ROCK in $ROCKS; do
sudo apt install redis-server
sudo service redis-server start
done
fi
if [ ! -d .git ]; then
echo -en "${Green}Would you like to clone the source of acrcloud sdk python? (Y/N): ${Default}"
read REPLY
if [[ $REPLY == [yY] ]]; then
echo -en "${Orange}Fetching latest acrcloud sdk python source code\n${Default}"
git clone https://github.com/acrcloud/acrcloud_sdk_python && cd acrcloud_sdk_python && python3 setup.py install && cd ..
fi
fi
echo -en "${BGreen}SpntaBot successfully installed! Change values in config file";;
*) echo "Exiting...";;
esac