-
Notifications
You must be signed in to change notification settings - Fork 84
/
Copy pathPBX
36 lines (31 loc) · 760 Bytes
/
PBX
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
#!/bin/bash
_Pbx_zip () {
if [[ $GIT_REPO ]]
then
echo "https://github.com/${GIT_REPO}/archive/master.zip"
else
echo "https://github.com/Badhacker98/Plugins/archive/master.zip"
fi
}
_library () {
if [[ $BOT_LIBRARY == "pyrogram" ]]
then
python3 -m PyrogramPbx
else
python3 -m TelethonPbx
fi
}
_starter () {
local Pbxpath
Pbxpath="Plugins.zip"
echo "••• DOWNLOADING PBXBOT •••"
wget -q $(_Pbx_zip) -O "$Pbxpath"
PBXPATH=$(zipinfo -1 "$Pbxpath" | grep -v "/.");
unzip -qq "$Pbxpath"
rm -rf "$Pbxpath"
cd $PBXPATH
python3 ../updater.py ../requirements.txt requirements.txt
echo "••• STARTING PBXBOT •••"
_library
}
_starter