forked from LEGEND-OS/LEGENDBOT
-
Notifications
You must be signed in to change notification settings - Fork 0
/
LegendBot
48 lines (42 loc) · 1.42 KB
/
LegendBot
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
_get_repolink () {
local regex
regex='(https?)://github.com/.+/.+'
if [[ $LEGEND_REPO == "LEGENDBOT" ]]
then
echo "aHR0cHM6Ly9naXRodWIuY29tL1RoZS1MZWdlbmRCb3QvTEVHRU5EVVNFUkJPVC9hcmNoaXZlL0xlZ2VuZEJvdC56aXA=" | base64 -d
elif [[ $LEGEND_REPO == "LEGENDBOT" ]]
then
echo "aHR0cHM6Ly9naXRodWIuY29tL1RoZS1MZWdlbmRCb3QvTEVHRU5EVVNFUkJPVC9hcmNoaXZlL0xlZ2VuZEJvdC56aXA=" | base64 -d
elif [[ $LEGEND_REPO =~ $regex ]]
then
if [[ $LEGEND_REPO_BRANCH ]]
then
echo "${LEGEND_REPO}/archive/${LEGEND_REPO_BRANCH}.zip"
else
echo "${LEGEND_REPO}/archive/master.zip"
fi
else
echo "aHR0cHM6Ly9naXRodWIuY29tL1RoZS1MZWdlbmRCb3QvTEVHRU5EVVNFUkJPVC9hcmNoaXZlL0xlZ2VuZEJvdC56aXA=" | base64 -d
fi
}
_setting_bot () {
local zippath
zippath="LegendBot.zip"
echo " Downloading LegendBot V3.O Source Code..."
wget -q $(_get_repolink) -O "$zippath"
echo " Unpacking Data ..."
LEGENDPATH=$(zipinfo -1 "$zippath" | grep -v "/.");
unzip -qq "$zippath"
echo "Done"
echo " LegendBot V3.O Cleaning.."
rm -rf "$zippath"
sleep 5
cd $LEGENDPATH
echo " ⚜️Starting Lêɠêɳ̃dẞø†⚜️ "
echo "
🇮🇳🇮🇳🇮🇳🇮🇳🇮🇳🇮🇳🇮🇳🇮🇳🇮🇳🇮🇳
"
python3 ../setup/updater.py ../requirements.txt requirements.txt
python3 -m userbot
}
_setting_bot