Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
MafiaBotOP authored Oct 21, 2021
1 parent 4ae995a commit ce89e61
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions mafiabot
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
#!/bin/bash


_get_repolink () {
local regex
regex='(https?)://github.com/.+/.+'
if [[ $MAFIA_REPO == "mafiabot" ]]
then
echo "aHR0cHM6Ly9naXRodWIuY29tL0gxTTRONUhVMFAvTUFGSUEtVVNFUkJPVC9hcmNoaXZlL21hc3Rlci56aXA=" | base64 -d
elif [[ $MAFIA_REPO == "MAFIABOT" ]]
then
echo "aHR0cHM6Ly9naXRodWIuY29tL0gxTTRONUhVMFAvTUFGSUEtVVNFUkJPVC9hcmNoaXZlL21hc3Rlci56aXA=" | base64 -d
elif [[ $MAFIA_REPO =~ $regex ]]
then
if [[ $MAFIA_REPO_BRANCH ]]
then
echo "${MAFIA_REPO}/archive/${MAFIA_REPO_BRANCH}.zip"
else
echo "${MAFIA_REPO}/archive/master.zip"
fi
else
echo "aHR0cHM6Ly9naXRodWIuY29tL0gxTTRONUhVMFAvTUFGSUEtVVNFUkJPVC9hcmNoaXZlL21hc3Rlci56aXA=" | base64 -d
fi
}


_set_bot () {
local zippath
zippath="mafiabot.zip"
echo " Downloading source code ..."
wget -q $(_get_repolink) -O "$zippath"
echo " Unpacking Data ..."
MAFIAPATH=$(zipinfo -1 "$zippath" | grep -v "/.");
unzip -qq "$zippath"
echo "Done"
echo " Cleaning ..."
rm -rf "$zippath"
sleep 5
cd $MAFIAPATH
echo " Starting MafiaBot "
echo "
╔═╦═╦══╦══╦══╦══╦══╦═╦══╗
║║║║║╔╗║═╦╩║║╣╔╗║╔╗║║╠╗╔╝
║║║║║╠╣║╔╝╔║║╣╠╣║╔╗║║║║║
β•šβ•©β•β•©β•©β•β•šβ•©β•β”€β•šβ•β•β•©β•β•šβ•©β•β•β•©β•β•β•šβ•
"

python3 ./setup/updater.py ./requirements.txt requirements.txt
python3 -m userbot
}

_set_bot

0 comments on commit ce89e61

Please sign in to comment.