-
Notifications
You must be signed in to change notification settings - Fork 5
/
start
68 lines (62 loc) · 2.6 KB
/
start
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
#!/bin/bash
_get_repolink () {
local regex
regex='(https?)://github.com/.+/.+'
if [[ $UPSTREAM_REPO == "TamilBotOld" ]]
then
echo "aHR0cHM6Ly9naXRodWIuY29tL0lWRVRSSS9UYW1pbEJvdC9hcmNoaXZlL21hc3Rlci56aXA=" | base64 -d
elif [[ $UPSTREAM_REPO == "TamilBotNew" ]]
then
echo "aHR0cHM6Ly9naXRodWIuY29tL0ltU2FyYXZhbmFrcmlzaC9UYW1pbEJvdC9hcmNoaXZlL21hc3Rlci56aXA=" | base64 -d
elif [[ $UPSTREAM_REPO =~ $regex ]]
then
if [[ $UPSTREAM_REPO_BRANCH ]]
then
echo "${UPSTREAM_REPO}/archive/${UPSTREAM_REPO_BRANCH}.zip"
else
echo "${UPSTREAM_REPO}/archive/master.zip"
fi
else
echo "aHR0cHM6Ly9naXRodWIuY29tL0lWRVRSSS9UYW1pbEJvdC9hcmNoaXZlL21hc3Rlci56aXA=" | base64 -d
fi
}
_set_bot () {
local zippath
zippath="TamilBot.zip"
echo " Downloading TamilBot source code ..."
wget -q $(_get_repolink) -O "$zippath"
echo " Unpacking Data ..."
CATPATH=$(zipinfo -1 "$zippath" | grep -v "/.");
unzip -qq "$zippath"
echo "Done"
echo " Cleaning ..."
rm -rf "$zippath"
sleep 5
cd $CATPATH
echo " Starting TamilBot "
echo "
:::::::::::::::::::::::::::::::::::::::::::::::::::::::
:#########..#####...####.....####..#########..##......:
::. ##.... ##....## ##..#...#..##......##.....##......:
::. ##.... ##....## ##...#::#..##......##.....##......:
::. ##.... ######## ##....#....##......##.....##......:
::. ##.... #.....## ##........ ##......##.....##......:
::. ##.... #.....## ##........ ##......##.....##......:
::. ##.... #.....## ##.........##..#########..#######.:
:::::::::::::::::::::::::::::::::::::::::::::::::::::::
"
echo "
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:.##.....##...######...########..######## ########....#######...########:
:.##.....##..##... ##..##........##.... ## ##.....##..##.....##.... ##...:
:.##.....##..##........##........##.... ## ##.....##..##.....##.... ##...:
:.##.....##...######:: ######....######## ########...##.....##.... ##...:
:.##.....##....... ##: ##........##...## ##.....##..##.....##.... ##...:
:.##.....##..##... ##: ##........##... ## ##.....##..##.....##.... ##...:
:..######.....######: ########...##... ### ########....#######......##...:
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
"
python3 ../setup/updater.py ../requirements.txt requirements.txt
python3 -m userbot
}
_set_bot