This repository has been archived by the owner on Apr 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.sh
122 lines (101 loc) · 2.45 KB
/
setup.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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
#!/bin/bash
sudo apt update
if ! command -v python3 &> /dev/null
then
echo "Python 3 is not installed. Do you want to install it now? (y/n)"
read choice
if [ "$choice" = "y" ]
then
echo "Installing Python 3 and pip using apt..."
sudo apt install python3 python3-pip
else
echo "Aborting..."
exit 1
fi
fi
if ! command -v pip3 &> /dev/null
then
echo "pip is not installed. Do you want to install it now? (y/n)"
read choice
if [ "$choice" = "y" ]
then
echo "Installing pip using apt..."
sudo apt install python3-pip
else
echo "Aborting..."
exit 1
fi
fi
if ! command -v rename &> /dev/null
then
echo "rename is not installed. Do you want to install it now? (y/n)"
read choice
if [ "$choice" = "y" ]
then
echo "Installing rename using apt..."
sudo apt install rename
else
echo "Aborting..."
exit 1
fi
fi
if [ -d "Venv" ]; then
rm -r "Venv"
fi
python3 -m venv Venv
source Venv/bin/activate
pip install -r requirements.txt
git clone https://github.com/nextcord/nextcord/
cd nextcord
python3 -m pip install -U .[voice]
# TODO Автоматическое создание config-файла с ручным вводом переменных
#if ! command -v unzip &> /dev/null
#then
# echo "unzip is not installed. Do you want to install it now? (y/n)"
# read choice
# if [ "$choice" = "y" ]
# then
# echo "Installing unzip using apt..."
# sudo apt install unzip
# else
# echo "Aborting..."
# exit 1
# fi
#fi
#expected_hash="b7a710cd995b244f7cf0f9165894900e"
#wget http://84.252.74.222:9000/nextcord.zip
#actual_hash=$(md5sum nextcord.zip | cut -d " " -f 1)
#cat > configuration.py << EOL
#
#discord_token: str = ""
#
#qiwi_number: str = "" # for AuthPayTempCog
#
#qiwi_token: str = "" # for AuthPayTempCog
#
#vk_app_id: int = 000000
#
#vk_servise_key: str = ""
#
#avatar_author: str = ""
#
#cogs_add_on_ready: list[str] = [""]
#
#test_guild_ids: list[int] = []
#
#EOL
#if [ "$actual_hash" = "$expected_hash" ]
#then
# apt install python3.10-venv
# python3 -m venv Venv
# source Venv/bin/activate
# pip install -r requirements.txt
# sudo unzip nextcord.zip -d "Venv/lib/python3.8/site-packages/"
# deactivate
# rm nextcord.zip
# echo "unzip installation completed!"
#else
# rm nextcord.zip
# echo "Hash does not match, exiting..."
# exit 1
#fi