2024-02-13 02:49:00 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# Store current directory
|
|
|
|
current_dir=$(pwd)
|
|
|
|
|
2024-02-13 17:08:26 +00:00
|
|
|
# Load venv
|
|
|
|
source venv/bin/activate
|
2024-02-13 02:49:00 +00:00
|
|
|
|
2024-02-13 17:08:26 +00:00
|
|
|
# Clone the simplematrixbotlib repository
|
|
|
|
git clone https://codeberg.org/imbev/simplematrixbotlib.git
|
2024-02-13 02:49:00 +00:00
|
|
|
|
|
|
|
# Change directory to simplematrixbotlib
|
|
|
|
cd $current_dir/simplematrixbotlib/
|
|
|
|
|
|
|
|
# Install simplematrixbotlib
|
|
|
|
pip install .
|
|
|
|
|
|
|
|
# Change back to the original directory
|
|
|
|
cd $current_dir
|
|
|
|
|
|
|
|
# Install requirements
|
|
|
|
pip install -r requirements.txt
|
|
|
|
|
|
|
|
# Create .env file with required content
|
|
|
|
echo -e "MATRIX_URL = \"https://matrix.org\"\nMATRIX_USER = \"\"\nMATRIX_PASS = \"\"" > .env
|
|
|
|
|
|
|
|
# Print ASCII art
|
|
|
|
echo " _____ ____ _ "
|
|
|
|
echo "| ___| _ _ __ __ _ _ _ _ _ | __ ) ___ | |_ "
|
|
|
|
echo "| |_ | | | | '_ \ / _\` | | | | | | | | _ \ / _ \| __| "
|
|
|
|
echo "| _|| |_| | | | | (_| | |_| | |_| | | |_) | (_) | |_ "
|
|
|
|
echo "|_| \__,_|_| |_|\__, |\__,_|\__, | |____/ \___/ \__| "
|
|
|
|
echo " |___/ |___/ "
|
|
|
|
|
|
|
|
# Echo setup completion message
|
|
|
|
echo "Bot setup completed."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Prompt user to modify funguy.py to set ADMIN_USER
|
|
|
|
echo "Modify .env file and set your credentials and homeserver"
|
|
|
|
echo "Please open funguy.py and set the ADMIN_USER variable to your admin username."
|
|
|
|
|
|
|
|
# Launch the bot
|
|
|
|
echo "Launch the bot with 'python funguy.py'"
|