-
Notifications
You must be signed in to change notification settings - Fork 23
/
TH3BOSS.sh
46 lines (41 loc) · 1009 Bytes
/
TH3BOSS.sh
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
THIS_DIR=$(cd $(dirname $0); pwd)
cd $THIS_DIR
install() {
sudo apt-get update -y
sudo apt-get upgrade -y
sudo apt-get install lua5.1 lua-socket lua-sec redis-server curl -y
sudo apt-get install libreadline-dev libssl-dev lua5.2 luarocks liblua5.2-dev curl libcurl4-gnutls-dev -y
git clone http://github.com/keplerproject/luarocks
cd luarocks
./configure --lua-version=5.2
make build
sudo make install
sudo luarocks install Lua-cURL
sudo luarocks install oauth
sudo luarocks install redis-lua
sudo luarocks install lua-cjson
sudo luarocks install ansicolors
sudo luarocks install serpent
cd ..
}
red() {
printf '\e[1;31m%s\n\e[0;39;49m' "$@"
}
green() {
printf '\e[1;32m%s\n\e[0;39;49m' "$@"
}
white() {
printf '\e[1;37m%s\n\e[0;39;49m' "$@"
}
update() {
git pull
}
if [ "$1" = "install" ]; then
install
elif [ "$1" = "update" ]; then
update
exit 1
else
green " جاري تشغيل سورس الــزعــيــم تــوكــن ... "
lua ./bot/bot.lua
fi