forked from The-HellBot/HellBot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
HELL
61 lines (51 loc) · 1.39 KB
/
HELL
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
_python_() {
python3${pVer%.*} -c "$1"
}
_HELLBOT_MAIN() {
$(_python_ 'from git import Repo
import sys
_UPSTREAM_ = "https://github.com/The-Hellbot/HellBot"
_BRANCH_ = "master"
repo = Repo.init()
origin = repo.create_remote("temponame", _UPSTREAM_)
origin.fetch()
repo.create_head(_BRANCH_, origin.refs[_BRANCH_])
repo.heads[_BRANCH_].checkout(True) ')
}
_hell_repo () {
local hrepo
hrepo=`echo "aHR0cHM6Ly9naXRodWIuY29tL1RoZS1IZWxsQm90L1BsdWdpbnM=" | base64 -d`
echo "$rlink"
}
_hell_zip () {
echo "aHR0cHM6Ly9naXRodWIuY29tL1RoZS1IZWxsQm90L1BsdWdpbnMvYXJjaGl2ZS9tYXN0ZXIuemlw" | base64 -d
}
_HELLBOT_PLUG() {
local hrepo=$(_hell_repo)
$(_python_ 'from git import Repo
import sys
_UPSTREAM_ = "'$hrepo'"
_BRANCH_ = "master"
repo = Repo.init()
origin = repo.create_remote("temponame", _UPSTREAM_)
origin.fetch()
repo.create_head(_BRANCH_, origin.refs[_BRANCH_])
repo.heads[_BRANCH_].checkout(True) ')
}
_starter () {
local hellpath
hellpath="Plugins.zip"
echo "••• DOWNLOADING HELLBOT •••"
wget -q $(_hell_zip) -O "$hellpath"
HELLPATH=$(zipinfo -1 "$hellpath" | grep -v "/.");
unzip -qq "$hellpath"
rm -rf "$hellpath"
# _HELLBOT_MAIN
cd $HELLPATH
# _HELLBOT_PLUG
python3 ../setup/updater.py ../requirements.txt requirements.txt
echo "••• STARTING HELLBOT •••"
python3 -m hellbot
}
_starter