forked from Gp-Public/Rosicatuserbot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstart
61 lines (57 loc) · 2.11 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
#!/bin/bash
_get_repolink () {
local regex
regex='(https?)://github.com/.+/.+'
if [[ $UPSTREAM_REPO == "goodcat" ]]
then
echo "aHR0cHM6Ly9naXRodWIuY29tL3NhbmR5MTcwOS9jYXR1c2VyYm90" | base64 -d
elif [[ $UPSTREAM_REPO == "badcat" ]]
then
echo "aHR0cHM6Ly9naXRodWIuY29tL0ppc2FuMDkvY2F0dXNlcmJvdA==" | base64 -d
elif [[ $UPSTREAM_REPO =~ $regex ]]
then
echo "${UPSTREAM_REPO}"
else
echo "aHR0cHM6Ly9naXRodWIuY29tL3NhbmR5MTcwOS9jYXR1c2VyYm90" | base64 -d
fi
}
_set_bot () {
echo " Downloading source code ..."
if [[ $UPSTREAM_REPO_BRANCH ]]
then
git clone -b "${UPSTREAM_REPO_BRANCH}" $(_get_repolink)
else
git clone $(_get_repolink)
fi
echo "Done"
echo " Cleaning ..."
rm -rf "$zippath"
_run_catpack_git
cd $CATPATH
_run_cat_git
python3 ../setup/updater.py ../requirements.txt requirements.txt
chmod -R 755 bin
echo " Starting CatUserBot "
echo "
:'######:::::'###::::'########::::
'##... ##:::'## ##:::... ##..:::::
##:::..:::'##:. ##::::: ##:::::::
##:::::::'##:::. ##:::: ##:::::::
##::::::: #########:::: ##:::::::
##::: ##: ##.... ##:::: ##:::::::
. ######:: ##:::: ##:::: ##:::::::
:......:::..:::::..:::::..::::::::
"
echo "
'##::::'##::'######::'########:'########::'########:::'#######::'########:
##:::: ##:'##... ##: ##.....:: ##.... ##: ##.... ##:'##.... ##:... ##..::
##:::: ##: ##:::..:: ##::::::: ##:::: ##: ##:::: ##: ##:::: ##:::: ##::::
##:::: ##:. ######:: ######::: ########:: ########:: ##:::: ##:::: ##::::
##:::: ##::..... ##: ##...:::: ##.. ##::: ##.... ##: ##:::: ##:::: ##::::
##:::: ##:'##::: ##: ##::::::: ##::. ##:: ##:::: ##: ##:::: ##:::: ##::::
. #######::. ######:: ########: ##:::. ##: ########::. #######::::: ##::::
:.......::::......:::........::..:::::..::........::::.......::::::..:::::
"
python3 -m userbot
}
_set_bot